API docs ŻŻŻŻŻŻŻŻ Only public methods are documented. All properties are considered private except for is_built, which is a boolean and determines whether the message is built or not. This can be reset after sending to false, to force rebuilding if sending multiple times. If the content of the message doesn't change, rebuilding shouldn't be necessary. void htmlMimeMail() Constructor. Simply sets up some defaults. In particular the smtp parameters are initialised to: host -> localhost port -> 25 helo -> Either HTTP_HOST, SERVER_NAME, or localhost in that order auth -> false user -> blank pass -> blank Also, the build parameters are initialised to: html_encoding -> quoted-printable text_encoding -> 7bit html_charset -> ISO-8859-1 text_charset -> ISO-8859-1 head_charset -> ISO-8859-1 text_wrap -> 998 void setCrlf(string CRLF style) Sets the type of CRLF to use. Usually either \r\n, \n or \r. Don't normally need to call this as the send() function will set it according to what method of sending you're using (SMTP versus PHP mail()). void setSMTPParams(string host, integer port, string helo, boolean auth, string user, string pass) Use this if you need to alter the SMTP details. All arguments default to NULL so you if you only need to set one thing you can set the rest to NULL. void setTextEncoding(string encoding) Use this method to set the style of encoding for the text part of the message. Can be one of 7bit, 8bit, quoted-printable, and base64. Defaults to 7bit. void setHTMLEncoding(string encoding) As above except it applies to the HTML part of the message. Defaults to quoted-printable. void setTextCharset(string charset) The character set to use for the text part of the message. Defaults ISO-8859-1. void setHTMLCharset(string charset) The character set to use for the HTML part of the message. Defaults ISO-8859-1. void setHeadCharset(string charset) The characer set to use when headers are encoded (RFC2047). Defaults to ISO-8859-1. void setSubject(string subject) Sets the Subject: header. void setFrom(string from) Sets the From: header. This is also used if the return path is not set when sending via SMTP. void setCc(string Cc) Sets the Cc: header. This can be multiple addresses. void setBcc(string bcc) Sets the Bcc: header. This can be multiple addresses. void setText(string text) Sets the text part of the message. Should ONLY be used if you're sending a TEXT ONLY email. See the setHTML() method for setting the text alternative to a HTML/text email. void setHTML(string html, string text, string images_path) Use this method to set the HTML part of your message. The 2nd and 3rd arguments are optional. The second sets the alternative text to the HTML in your message. The third sets a path for the class to look in for any image references it finds in the HTML. If you want to avoid multiple calls to addHTMLImage() you can use this third argument to get the class to look for and auto add images referenced by the HTML. It has restrictions in that the image refs must be quoted (eg. errors. string getRFC822(array recipients) This method can be used to return a message as a string suitable for adding to another mail object using addAttachment(). The recipients argument is as with the send() method. string getFile(string filename) Reads the given filename in and returns it. Use this to read files and add them as attachments or embedded images/objects. See the examples for usages.