Adds a "To" address.
void
AddAddress
(string $address, [string $name = ""])
-
string
$address
-
string
$name
Adds an attachment from a path on the filesystem.
Returns false if the file could not be found or accessed.
bool
AddAttachment
(string $path, [string $name = ""], [string $encoding = "base64"], [string $type = "application/octet-stream"])
-
string
$path:
Path to the attachment.
-
string
$name:
Overrides the attachment name.
-
string
$encoding:
File encoding (see $Encoding).
-
string
$type:
File extension (MIME) type.
Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
void
AddBCC
(string $address, [string $name = ""])
-
string
$address
-
string
$name
Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
void
AddCC
(string $address, [string $name = ""])
-
string
$address
-
string
$name
Adds a custom header.
void
AddCustomHeader
(mixed $custom_header)
Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".
bool
AddEmbeddedImage
(string $path, string $cid, [string $name = ""], [string $encoding = "base64"], [string $type = "application/octet-stream"])
-
string
$path:
Path to the attachment.
-
string
$cid:
Content ID of the attachment. Use this to identify the Id for accessing the image in an HTML form.
-
string
$name:
Overrides the attachment name.
-
string
$encoding:
File encoding (see $Encoding).
-
string
$type:
File extension (MIME) type.
Adds a "Reply-to" address.
void
AddReplyTo
(string $address, [string $name = ""])
-
string
$address
-
string
$name
Adds a string or binary attachment (non-filesystem) to the list.
This method can be used to attach ascii or binary data, such as a BLOB record from a database.
void
AddStringAttachment
(string $string, string $filename, [string $encoding = "base64"], [string $type = "application/octet-stream"])
-
string
$string:
String attachment data.
-
string
$filename:
Name of the attachment.
-
string
$encoding:
File encoding (see $Encoding).
-
string
$type:
File extension (MIME) type.
Clears all recipients assigned in the TO array. Returns void.
void
ClearAddresses
()
Clears all recipients assigned in the TO, CC and BCC array. Returns void.
void
ClearAllRecipients
()
Clears all previously set filesystem, string, and binary attachments. Returns void.
void
ClearAttachments
()
Clears all recipients assigned in the BCC array. Returns void.
void
ClearBCCs
()
Clears all recipients assigned in the CC array. Returns void.
void
ClearCCs
()
Clears all custom headers. Returns void.
void
ClearCustomHeaders
()
Clears all recipients assigned in the ReplyTo array. Returns void.
void
ClearReplyTos
()
Returns true if an error occurred.
bool
IsError
()
Sets message type to HTML.
void
IsHTML
(bool $bool)
Sets Mailer to send message using PHP mail() function.
void
IsMail
()
Sets Mailer to send message using the qmail MTA.
void
IsQmail
()
Sets Mailer to send message using the $Sendmail program.
void
IsSendmail
()
Sets Mailer to send message using SMTP.
void
IsSMTP
()
Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.
bool
Send
()
Sets the language for all class error messages. Returns false if it cannot load the language file. The default language type is English.
bool
SetLanguage
(string $lang_type, [string $lang_path = ""])
-
string
$lang_type:
Type of language (e.g. Portuguese: "br")
-
string
$lang_path:
Path to the language file directory
Closes the active SMTP session if one exists.
void
SmtpClose
()