phpmailer
Located in File: Program_Root/class.phpmailer.php
defaultBrent R. Matzelle| Class Variable Summary |
$AltBody
Sets the text-only body of the message. Default Value:
|
$Body
Sets the Body of the message. Default Value:
|
$CharSet
Sets the CharSet of the message. Default Value:
|
$ConfirmReadingTo
Sets the email address that a reading confirmation will be sent. Default Value:
|
$ContentType
Sets the Content-type of the message. Default Value:
|
$CustomHeader
Holds all custom headers. Default Value:
|
$Encoding
Sets the Encoding of the message. Default Value:
|
$ErrorInfo
Holds the most recent mailer error message. Default Value:
|
$From
Sets the From email address for the message. Default Value:
|
$FromName
Sets the From name of the message. Default Value:
|
$Helo
Sets the SMTP HELO of the message (Default is $Hostname). Default Value:
|
$Host
Sets the SMTP hosts. Default Value:
|
$Hostname
Sets the hostname to use in Message-Id and Received headers and as default HELO string. Default Value:
|
$LE
Sets the line endings of the message. Default Value:
|
$Mailer
Method to send mail: ("mail", "sendmail", or "smtp"). Default Value:
|
$message_type
Holds the type of the message. Default Value:
|
$Password
Sets SMTP password. Default Value:
|
$PluginDir
Path to phpmailer plugins. This is now only useful if the SMTP class is in a different directory than the PHP include path. Default Value:
|
$Port
Sets the default SMTP server port. Default Value:
|
$Priority
Email priority (1 = High, 3 = Normal, 5 = low). Default Value:
|
$ReplyTo
Holds all "Reply-To" addresses. Default Value:
|
$Sender
Sets the Sender email of the message. Default Value:
|
$Sendmail
Sets the path of the sendmail program. Default Value:
|
$SMTPAuth
Sets SMTP authentication. Default Value:
|
$SMTPDebug
Sets SMTP class debugging on or off. Default Value:
|
$Subject
Sets the Subject of the message. Default Value:
|
$Timeout
Sets the SMTP server timeout in seconds. Default Value:
|
$UseMSMailHeaders
Turns Microsoft mail client headers on and off. Default Value:
|
$Username
Sets SMTP username. Default Value:
|
$Version
Holds phpmailer version. Default Value:
|
$WordWrap
Sets word wrapping on the body of the message to a given number of characters. Default Value:
|
| Inherited Class Variable Summary |
| Inherited Method Summary |
| Method Summary |
void AddAddress ( $address, $name )
Adds a "To" address. |
bool AddAttachment ( $path, $name, [$encoding = "base64"], [$type = "application/octet-stream"] )
Adds an attachment from a path on the filesystem. |
void AddBCC ( $address, $name )
Adds a "Bcc" address. |
void AddCC ( $address, $name )
Adds a "Cc" address. |
void AddCustomHeader ( $custom_header )
Adds a custom header. |
bool AddEmbeddedImage ( $path, $cid, $name, [$encoding = "base64"], [$type = "application/octet-stream"] )
Adds an embedded attachment. This can include images, sounds, and just about any other document. |
void AddReplyTo ( $address, $name )
Adds a "Reply-to" address. |
void AddStringAttachment ( $string, $filename, [$encoding = "base64"], [$type = "application/octet-stream"] )
Adds a string or binary attachment (non-filesystem) to the list. |
void ClearAddresses ( )
Clears all recipients assigned in the TO array. |
void ClearAllRecipients ( )
Clears all recipients assigned in the TO, CC and BCC array. |
void ClearAttachments ( )
Clears all previously set filesystem, string, and binary attachments. |
void ClearBCCs ( )
Clears all recipients assigned in the BCC array. |
void ClearCCs ( )
Clears all recipients assigned in the CC array. |
void ClearCustomHeaders ( )
Clears all custom headers. |
void ClearReplyTos ( )
Clears all recipients assigned in the ReplyTo array. |
void IsHTML ( $bool )
Sets message type to HTML. |
void IsMail ( )
Sets Mailer to send message using PHP mail() function. Returns void. |
void IsQmail ( )
Sets Mailer to send message using the qmail MTA. |
void IsSendmail ( )
Sets Mailer to send message using the $Sendmail program. Returns void. |
void IsSMTP ( )
Sets Mailer to send message using SMTP. Returns void. |
bool Send ( )
Creates message and assigns Mailer. |
string SendToQueue ( $queue_path, [$send_time = 0] )
Sends mail message to an assigned queue directory. |
| Variable Detail |
This automatically sets the email to multipart/alternative. This body can be read by mail clients that do not have HTML email capability such as mutt. Clients that can read HTML will view the normal Body.
publicThis can be either an HTML or text body. If HTML then run IsHTML(true).
publicpublicpublicpublicOptions for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".
publicpublicpublicpublicpublicAll hosts must be separated by a semicolon. You can also specify a different port for each host by using this format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com"). Hosts will be tried in order.
publicIf empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.
publicpublicpublicpublicpublicpublicpublicIf not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
publicpublicUtilizes the Username and Password variables.
publicpublicpublicThis function will not work with the win32 version.
publicUseful mostly for older clients.
publicpublicpublicpublic| Method Detail |
void AddAddress ( $address, $name )
Adds a "To" address.Returns void.
publicbool AddAttachment ( $path, $name, [$encoding = "base64"], [$type = "application/octet-stream"] )
Adds an attachment from a path on the filesystem.Checks if attachment is valid and then adds the attachment to the list. Returns false if the file could not be found or accessed.
publicvoid AddBCC ( $address, $name )
Adds a "Bcc" address.Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. This is a PHP bug that has been submitted on http://bugs.php.net. The *NIX version of PHP functions correctly. Returns void.
publicvoid AddCC ( $address, $name )
Adds a "Cc" address.Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. This is a PHP bug that has been submitted on http://bugs.php.net. The *NIX version of PHP functions correctly. Returns void.
publicvoid AddCustomHeader ( $custom_header )
Adds a custom header.Returns void.
publicbool AddEmbeddedImage ( $path, $cid, $name, [$encoding = "base64"], [$type = "application/octet-stream"] )
Adds an embedded attachment. This can include images, sounds, and just about any other document.- cid $path: this is the Content Id of the attachment. Use this to identify
the Id for accessing the image in an HTML form.publicvoid AddReplyTo ( $address, $name )
Adds a "Reply-to" address.Returns void.
publicvoid AddStringAttachment ( $string, $filename, [$encoding = "base64"], [$type = "application/octet-stream"] )
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.
publicvoid ClearAddresses ( )
Clears all recipients assigned in the TO array.Returns void.
publicvoid ClearAllRecipients ( )
Clears all recipients assigned in the TO, CC and BCC array.Returns void.
publicvoid ClearAttachments ( )
Clears all previously set filesystem, string, and binary attachments.Returns void.
publicvoid ClearBCCs ( )
Clears all recipients assigned in the BCC array.Returns void.
publicvoid ClearCCs ( )
Clears all recipients assigned in the CC array.Returns void.
publicvoid ClearCustomHeaders ( )
Clears all custom headers.Returns void.
publicvoid ClearReplyTos ( )
Clears all recipients assigned in the ReplyTo array.Returns void.
publicvoid IsHTML ( $bool )
Sets message type to HTML.Returns void.
publicvoid IsMail ( )
Sets Mailer to send message using PHP mail() function. Returns void.publicvoid IsQmail ( )
Sets Mailer to send message using the qmail MTA.Returns void.
publicvoid IsSendmail ( )
Sets Mailer to send message using the $Sendmail program. Returns void.publicvoid IsSMTP ( )
Sets Mailer to send message using SMTP. Returns void.publicbool Send ( )
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. Returns bool.
publicstring SendToQueue ( $queue_path, [$send_time = 0] )
Sends mail message to an assigned queue directory.Has an optional sendTime argument. This is used when the user wants the message to be sent from the queue at a predetermined time. The data must be a valid timestamp like that returned from the time() or strtotime() functions. Returns false on failure or the message file name if success.
public