phpmailer
Located in File: Program_Root/class.phpmailer.php
default
Brent 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.
public
This can be either an HTML or text body. If HTML then run IsHTML(true).
public
public
public
public
Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".
public
public
public
public
public
All 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.
public
If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.
public
public
public
public
public
public
public
If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
public
public
Utilizes the Username and Password variables.
public
public
public
This function will not work with the win32 version.
public
Useful mostly for older clients.
public
public
public
public
Method Detail |
void AddAddress ( $address, $name )
Adds a "To" address.Returns void.
public
bool 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.
public
void 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.
public
void 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.
public
void AddCustomHeader ( $custom_header )
Adds a custom header.Returns void.
public
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.- cid $path: this is the Content Id of the attachment. Use this to identify
the Id for accessing the image in an HTML form.
public
void AddReplyTo ( $address, $name )
Adds a "Reply-to" address.Returns void.
public
void 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.
public
void ClearAddresses ( )
Clears all recipients assigned in the TO array.Returns void.
public
void ClearAllRecipients ( )
Clears all recipients assigned in the TO, CC and BCC array.Returns void.
public
void ClearAttachments ( )
Clears all previously set filesystem, string, and binary attachments.Returns void.
public
void ClearBCCs ( )
Clears all recipients assigned in the BCC array.Returns void.
public
void ClearCCs ( )
Clears all recipients assigned in the CC array.Returns void.
public
void ClearCustomHeaders ( )
Clears all custom headers.Returns void.
public
void ClearReplyTos ( )
Clears all recipients assigned in the ReplyTo array.Returns void.
public
void IsHTML ( $bool )
Sets message type to HTML.Returns void.
public
void IsMail ( )
Sets Mailer to send message using PHP mail() function. Returns void.public
void IsQmail ( )
Sets Mailer to send message using the qmail MTA.Returns void.
public
void IsSendmail ( )
Sets Mailer to send message using the $Sendmail program. Returns void.public
void IsSMTP ( )
Sets Mailer to send message using SMTP. Returns void.public
bool 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.
public
string 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