PHPMailerPHPMailer - PHP email transport class
NOTE: Requires PHP version 5 or later
Located in /libs/PHPMailer/class.phpmailer.php (line 43)
bool
AddAttachment
(string $path, [string $name = ''], [string $encoding = 'base64'], [string $type = 'application/octet-stream'])
bool
AddEmbeddedImage
(string $path, string $cid, [string $name = ''], [string $encoding = 'base64'], [string $type = 'application/octet-stream'])
void
AddStringAttachment
(string $string, string $filename, [string $encoding = 'base64'], [string $type = 'application/octet-stream'])
string
EncodeQPphp
([ $input = ''], [integer $line_max = 76], [ $space_conv = false], string $string)
string
$action_function
= '' (line 297)
Callback Action function name
the function that handles the result of the send email action. Parameters: bool $result result of the send action string $to email address of the recipient string $cc cc email addresses string $bcc bcc email addresses string $subject the subject string $body the email body
string
$AltBody
= '' (line 119)
Sets the text-only body of the message. 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.
string
$Body
= '' (line 110)
Sets the Body of the message. This can be either an HTML or text body.
If HTML then run IsHTML(true).
string
$CharSet
= 'iso-8859-1' (line 59)
Sets the CharSet of the message.
string
$ConfirmReadingTo
= '' (line 151)
Sets the email address that a reading confirmation will be sent.
string
$ContentType
= 'text/plain' (line 65)
Sets the Content-type of the message.
string
$DKIM_domain
= '' (line 277)
Used with DKIM DNS Resource Record
optional, in format of email address 'you@yourdomain.com'
string
$DKIM_identity
= '' (line 270)
Used with DKIM DNS Resource Record
optional, in format of email address 'you@yourdomain.com'
string
$DKIM_private
= '' (line 284)
Used with DKIM DNS Resource Record
optional, in format of email address 'you@yourdomain.com'
string
$DKIM_selector
= 'phpmailer' (line 263)
Used with DKIM DNS Resource Record
string
$Encoding
= '8bit' (line 72)
Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".
string
$ErrorInfo
= '' (line 78)
Holds the most recent mailer error message.
string
$From
= 'root@localhost' (line 84)
Sets the From email address for the message.
string
$FromName
= 'Root User' (line 90)
Sets the From name of the message.
string
$Helo
= '' (line 192)
Sets the SMTP HELO of the message (Default is $Hostname).
string
$Host
= 'localhost' (line 180)
Sets the SMTP hosts. 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.
string
$Hostname
= '' (line 159)
Sets the hostname to use in Message-Id and Received headers and as default HELO string. If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.
mixed
$language
= array() (line 319)
string
$LE
= "\n" (line 257)
Provides the ability to change the line ending
string
$Mailer
= 'mail' (line 132)
Method to send mail: ("mail", "sendmail", or "smtp").
string
$MessageID
= '' (line 166)
Sets the message ID to be used in the Message-Id header.
If empty, a unique id will be generated.
string
$Password
= '' (line 217)
Sets SMTP password.
string
$PluginDir
= '' (line 145)
Path to PHPMailer plugins. Useful if the SMTP class is in a different directory than the PHP include path.
int
$Port
= 25 (line 186)
Sets the default SMTP server port.
int
$Priority
= 3 (line 53)
Email priority (1 = High, 3 = Normal, 5 = low).
string
$Sender
= '' (line 97)
Sets the Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
string
$Sendmail
= '/usr/sbin/sendmail' (line 138)
Sets the path of the sendmail program.
bool
$SingleTo
= false (line 245)
Provides the ability to have the TO field process individual
emails, instead of sending to entire TO addresses
bool
$SingleToArray
= array() (line 251)
If SingleTo is true, this provides the array to hold the email addresses
bool
$SMTPAuth
= false (line 205)
Sets SMTP authentication. Utilizes the Username and Password variables.
bool
$SMTPDebug
= false (line 230)
Sets SMTP class debugging on or off.
bool
$SMTPKeepAlive
= false (line 238)
Prevents the SMTP connection from being closed after each mail sending. If this is set to true then to close the connection requires an explicit call to SmtpClose().
string
$Subject
= '' (line 103)
Sets the Subject of the message.
int
$Timeout
= 10 (line 224)
Sets the SMTP server timeout in seconds.
This function will not work with the win32 version.
string
$Username
= '' (line 211)
Sets SMTP username.
string
$Version
= '5.1' (line 303)
Sets the PHPMailer Version number
int
$WordWrap
= 0 (line 126)
Sets word wrapping on the body of the message to a given number of characters.
Check that a string looks roughly like an email address should
Static so it can be used without instantiation Tries to use PHP built-in validator in the filter extension (from PHP 5.2), falls back to a reasonably competent regex validator Conforms approximately to RFC2822
Gets the MIME type of the embedded or inline image
Constructor
Adds a "To" address.
Adds an attachment from a path on the filesystem.
Returns false if the file could not be found or accessed.
Adds a "Bcc" address.
Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
Adds a "Cc" address.
Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
Adds a 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".
Adds a "Reply-to" address.
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.
Correctly encodes and wraps long multibyte strings for mail headers without breaking lines within a character.
Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php
Clears all recipients assigned in the TO array. Returns void.
Clears all recipients assigned in the TO, CC and BCC array. Returns void.
Clears all previously set filesystem, string, and binary attachments. Returns void.
Clears all recipients assigned in the BCC array. Returns void.
Clears all recipients assigned in the ReplyTo array. Returns void.
Assembles the message body. Returns an empty string on failure.
Create the DKIM header, body, as new header
Generate DKIM Canonicalization Body
Generate DKIM Canonicalization Header
Set the private key file and password to sign the message.
Encode a header string to best (shortest) of Q, B, quoted or none.
Encode string to q encoding.
Encode string to RFC2045 (6.7) quoted-printable format
Uses a PHP5 stream filter to do the encoding about 64x faster than the old version Also results in same content as you started with after decoding
Encode string to quoted-printable.
Only uses standard PHP, slow, but will always work
Encodes string to requested format.
Returns an empty string on failure.
Checks if a string contains multibyte characters.
Returns a formatted header line.
Returns true if an inline attachment is present.
Sends mail using the PHP mail() function.
Evaluates the message and returns modifications for inline images and backgrounds
Strips newlines to prevent header injection.
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.
Sends mail using the $Sendmail program.
Set (or reset) Class Objects (variables)
Usage Example: $page->set('X-Priority', '3');
Set the From and FromName properties
Sets the language for all class error messages.
Returns false if it cannot load the language file. The default language is English.
Set the private key file and password to sign the message.
Initiates a connection to an SMTP server.
Returns false if the operation failed.
Sends mail via SMTP using PhpSMTP Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string.
Original written by Colin Brown.
Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.
Original written by philippe.
Documentation generated on Sun, 04 Apr 2010 22:43:35 +0200 by phpDocumentor 1.4.1