Public Member Functions | |
__construct ($exceptions=false) | |
IsHTML ($ishtml=true) | |
IsSMTP () | |
IsMail () | |
IsSendmail () | |
IsQmail () | |
AddAddress ($address, $name= '') | |
AddCC ($address, $name= '') | |
AddBCC ($address, $name= '') | |
AddReplyTo ($address, $name= '') | |
SetFrom ($address, $name= '', $auto=1) | |
Send () | |
SmtpConnect () | |
SmtpClose () | |
SetLanguage ($langcode= 'en', $lang_path= 'language/') | |
GetTranslations () | |
AddrAppend ($type, $addr) | |
AddrFormat ($addr) | |
WrapText ($message, $length, $qp_mode=false) | |
UTF8CharBoundary ($encodedText, $maxLength) | |
SetWordWrap () | |
CreateHeader () | |
GetMailMIME () | |
CreateBody () | |
HeaderLine ($name, $value) | |
TextLine ($value) | |
AddAttachment ($path, $name= '', $encoding= 'base64', $type= 'application/octet-stream') | |
GetAttachments () | |
EncodeString ($str, $encoding= 'base64') | |
EncodeHeader ($str, $position= 'text') | |
HasMultiBytes ($str) | |
Base64EncodeWrapMB ($str) | |
EncodeQPphp ($input= '', $line_max=76, $space_conv=false) | |
EncodeQP ($string, $line_max=76, $space_conv=false) | |
EncodeQ ($str, $position= 'text') | |
AddStringAttachment ($string, $filename, $encoding= 'base64', $type= 'application/octet-stream') | |
AddEmbeddedImage ($path, $cid, $name= '', $encoding= 'base64', $type= 'application/octet-stream') | |
InlineImageExists () | |
ClearAddresses () | |
ClearCCs () | |
ClearBCCs () | |
ClearReplyTos () | |
ClearAllRecipients () | |
ClearAttachments () | |
ClearCustomHeaders () | |
IsError () | |
AddCustomHeader ($custom_header) | |
MsgHTML ($message, $basedir= '') | |
set ($name, $value= '') | |
SecureHeader ($str) | |
Sign ($cert_filename, $key_filename, $key_pass) | |
DKIM_QP ($txt) | |
DKIM_Sign ($s) | |
DKIM_HeaderC ($s) | |
DKIM_BodyC ($body) | |
DKIM_Add ($headers_line, $subject, $body) | |
Static Public Member Functions | |
static | ValidateAddress ($address) |
static | RFCDate () |
static | _mime_types ($ext= '') |
Data Fields | |
$Priority = 3 | |
$CharSet = 'iso-8859-1' | |
$ContentType = 'text/plain' | |
$Encoding = '8bit' | |
$ErrorInfo = '' | |
$From = 'root@localhost' | |
$FromName = 'Root User' | |
$Sender = '' | |
$Subject = '' | |
$Body = '' | |
$AltBody = '' | |
$WordWrap = 0 | |
$Mailer = 'mail' | |
$Sendmail = '/usr/sbin/sendmail' | |
$PluginDir = '' | |
$ConfirmReadingTo = '' | |
$Hostname = '' | |
$MessageID = '' | |
$Host = 'localhost' | |
$Port = 25 | |
$Helo = '' | |
$SMTPSecure = '' | |
$SMTPAuth = false | |
$Username = '' | |
$Password = '' | |
$Timeout = 10 | |
$SMTPDebug = false | |
$SMTPKeepAlive = false | |
$SingleTo = false | |
$SingleToArray = array() | |
$LE = "\n" | |
$DKIM_selector = 'phpmailer' | |
$DKIM_identity = '' | |
$DKIM_domain = '' | |
$DKIM_private = '' | |
$action_function = '' | |
$Version = '5.1' | |
const | STOP_MESSAGE = 0 |
const | STOP_CONTINUE = 1 |
const | STOP_CRITICAL = 2 |
Protected Member Functions | |
SendmailSend ($header, $body) | |
MailSend ($header, $body) | |
SmtpSend ($header, $body) | |
SetError ($msg) | |
doCallback ($isSent, $to, $cc, $bcc, $subject, $body) | |
Protected Attributes | |
$language = array() | |
Definition at line 43 of file class.phpmailer.php.
__construct | ( | $exceptions = false ) |
Constructor
boolean | $exceptions | Should we throw external exceptions? |
Definition at line 342 of file class.phpmailer.php.
|
static |
Gets the MIME type of the embedded or inline image
string | File extension public |
Definition at line 2041 of file class.phpmailer.php.
AddAddress | ( | $address, | |
$name = '' |
|||
) |
Adds a "To" address.
string | $address | |
string | $name |
Definition at line 407 of file class.phpmailer.php.
AddAttachment | ( | $path, | |
$name = '' , |
|||
$encoding = 'base64' , |
|||
$type = 'application/octet-stream' |
|||
) |
Adds an attachment from a path on the filesystem. Returns false if the file could not be found or accessed.
string | $path | Path to the attachment. |
string | $name | Overrides the attachment name. |
string | $encoding | File encoding (see $Encoding). |
string | $type | File extension (MIME) type. |
Definition at line 1344 of file class.phpmailer.php.
AddBCC | ( | $address, | |
$name = '' |
|||
) |
Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
string | $address | |
string | $name |
Definition at line 429 of file class.phpmailer.php.
AddCC | ( | $address, | |
$name = '' |
|||
) |
Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
string | $address | |
string | $name |
Definition at line 418 of file class.phpmailer.php.
AddCustomHeader | ( | $custom_header) |
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. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".
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. |
Definition at line 1783 of file class.phpmailer.php.
AddrAppend | ( | $type, | |
$addr | |||
) |
AddReplyTo | ( | $address, | |
$name = '' |
|||
) |
Adds a "Reply-to" address.
string | $address | |
string | $name |
Definition at line 439 of file class.phpmailer.php.
AddrFormat | ( | $addr) |
Formats an address correctly. public
Definition at line 914 of file class.phpmailer.php.
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.
string | $string | String attachment data. |
string | $filename | Name of the attachment. |
string | $encoding | File encoding (see $Encoding). |
string | $type | File extension (MIME) type. |
Definition at line 1756 of file class.phpmailer.php.
Base64EncodeWrapMB | ( | $str) |
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 public
string | $str | multi-byte text to wrap encode |
Definition at line 1599 of file class.phpmailer.php.
ClearAddresses | ( | ) |
Clears all recipients assigned in the TO array. Returns void.
Definition at line 1832 of file class.phpmailer.php.
ClearAllRecipients | ( | ) |
Clears all recipients assigned in the TO, CC and BCC array. Returns void.
Definition at line 1874 of file class.phpmailer.php.
ClearAttachments | ( | ) |
Clears all previously set filesystem, string, and binary attachments. Returns void.
Definition at line 1886 of file class.phpmailer.php.
ClearBCCs | ( | ) |
Clears all recipients assigned in the BCC array. Returns void.
Definition at line 1854 of file class.phpmailer.php.
ClearCCs | ( | ) |
Clears all recipients assigned in the CC array. Returns void.
Definition at line 1843 of file class.phpmailer.php.
ClearCustomHeaders | ( | ) |
Clears all custom headers. Returns void.
Definition at line 1894 of file class.phpmailer.php.
ClearReplyTos | ( | ) |
Clears all recipients assigned in the ReplyTo array. Returns void.
Definition at line 1865 of file class.phpmailer.php.
CreateBody | ( | ) |
Assembles the message body. Returns an empty string on failure. public
Definition at line 1190 of file class.phpmailer.php.
CreateHeader | ( | ) |
Assembles message header. public
Definition at line 1073 of file class.phpmailer.php.
DKIM_Add | ( | $headers_line, | |
$subject, | |||
$body | |||
) |
Create the DKIM header, body, as new header
public
string | $headers_line | Header lines |
string | $subject | Subject |
string | $body | Body |
Definition at line 2271 of file class.phpmailer.php.
DKIM_BodyC | ( | $body) |
Generate DKIM Canonicalization Body
public
string | $body | Message Body |
Definition at line 2251 of file class.phpmailer.php.
DKIM_HeaderC | ( | $s) |
Generate DKIM Canonicalization Header
public
string | $s | Header |
Definition at line 2232 of file class.phpmailer.php.
DKIM_QP | ( | $txt) |
Set the private key file and password to sign the message.
public
string | $key_filename | Parameter File Name |
string | $key_pass | Password for private key |
Definition at line 2194 of file class.phpmailer.php.
DKIM_Sign | ( | $s) |
Generate DKIM signature
public
string | $s | Header |
Definition at line 2214 of file class.phpmailer.php.
|
protected |
Definition at line 2306 of file class.phpmailer.php.
EncodeHeader | ( | $str, | |
$position = 'text' |
|||
) |
Encode a header string to best (shortest) of Q, B, quoted or none. public
Definition at line 1522 of file class.phpmailer.php.
EncodeQ | ( | $str, | |
$position = 'text' |
|||
) |
Encode string to q encoding. string $str the text to encode string $position Where the text is going to be used, see the RFC for what that means public string
Definition at line 1721 of file class.phpmailer.php.
EncodeQP | ( | $string, | |
$line_max = 76 , |
|||
$space_conv = false |
|||
) |
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
string | $string | the text to encode |
integer | $line_max | Number of chars allowed on a line before wrapping |
boolean | $space_conv | Dummy param for compatibility with existing EncodeQP function |
Definition at line 1692 of file class.phpmailer.php.
EncodeQPphp | ( | $input = '' , |
|
$line_max = 76 , |
|||
$space_conv = false |
|||
) |
Encode string to quoted-printable. Only uses standard PHP, slow, but will always work public
string | $string | the text to encode |
integer | $line_max | Number of chars allowed on a line before wrapping |
Definition at line 1639 of file class.phpmailer.php.
EncodeString | ( | $str, | |
$encoding = 'base64' |
|||
) |
Encodes string to requested format. Returns an empty string on failure.
string | $str | The text to encode |
string | $encoding | The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' public |
Definition at line 1491 of file class.phpmailer.php.
GetAttachments | ( | ) |
Return the current array of attachments
Definition at line 1382 of file class.phpmailer.php.
GetMailMIME | ( | ) |
GetTranslations | ( | ) |
Return the current array of language strings
Definition at line 884 of file class.phpmailer.php.
HasMultiBytes | ( | $str) |
Checks if a string contains multibyte characters. public
string | $str | multi-byte text to wrap encode |
Definition at line 1583 of file class.phpmailer.php.
HeaderLine | ( | $name, | |
$value | |||
) |
Returns a formatted header line. public
Definition at line 1317 of file class.phpmailer.php.
InlineImageExists | ( | ) |
Returns true if an inline attachment is present. public
Definition at line 1815 of file class.phpmailer.php.
IsError | ( | ) |
Returns true if an error occurred. public
Definition at line 1973 of file class.phpmailer.php.
IsHTML | ( | $ishtml = true ) |
Sets message type to HTML.
bool | $ishtml |
Definition at line 351 of file class.phpmailer.php.
IsMail | ( | ) |
Sets Mailer to send message using PHP mail() function.
Definition at line 371 of file class.phpmailer.php.
IsQmail | ( | ) |
Sets Mailer to send message using the qmail MTA.
Definition at line 390 of file class.phpmailer.php.
IsSendmail | ( | ) |
Sets Mailer to send message using the $Sendmail program.
Definition at line 379 of file class.phpmailer.php.
IsSMTP | ( | ) |
Sets Mailer to send message using SMTP.
Definition at line 363 of file class.phpmailer.php.
|
protected |
Sends mail using the PHP mail() function.
string | $header | The message headers |
string | $body | The message body protected |
Definition at line 644 of file class.phpmailer.php.
MsgHTML | ( | $message, | |
$basedir = '' |
|||
) |
Evaluates the message and returns modifications for inline images and backgrounds public
Definition at line 2003 of file class.phpmailer.php.
|
static |
Returns the proper RFC 822 formatted date. public
Definition at line 1924 of file class.phpmailer.php.
SecureHeader | ( | $str) |
Strips newlines to prevent header injection. public
string | $str | String |
Definition at line 2168 of file class.phpmailer.php.
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.
Definition at line 545 of file class.phpmailer.php.
|
protected |
Sends mail using the $Sendmail program.
string | $header | The message headers |
string | $body | The message body protected |
Definition at line 598 of file class.phpmailer.php.
set | ( | $name, | |
$value = '' |
|||
) |
Set (or reset) Class Objects (variables)
Usage Example: $page->set('X-Priority', '3');
public
string | $name | Parameter Name |
mixed | $value | Parameter Value NOTE: will not work with arrays, there are no arrays to set/reset |
Definition at line 2146 of file class.phpmailer.php.
|
protected |
Adds the error message to the error container. protected
Definition at line 1907 of file class.phpmailer.php.
SetFrom | ( | $address, | |
$name = '' , |
|||
$auto = 1 |
|||
) |
Set the From and FromName properties
string | $address | |
string | $name |
Definition at line 488 of file class.phpmailer.php.
SetLanguage | ( | $langcode = 'en' , |
|
$lang_path = 'language/' |
|||
) |
Sets the language for all class error messages. Returns false if it cannot load the language file. The default language is English.
string | $langcode | ISO 639-1 2-character language code (e.g. Portuguese: "br") |
string | $lang_path | Path to the language file directory public |
Definition at line 850 of file class.phpmailer.php.
SetWordWrap | ( | ) |
Sign | ( | $cert_filename, | |
$key_filename, | |||
$key_pass | |||
) |
Set the private key file and password to sign the message.
public
string | $key_filename | Parameter File Name |
string | $key_pass | Password for private key |
Definition at line 2181 of file class.phpmailer.php.
SmtpClose | ( | ) |
Closes the active SMTP session if one exists.
Definition at line 834 of file class.phpmailer.php.
SmtpConnect | ( | ) |
Initiates a connection to an SMTP server. Returns false if the operation failed. SMTP public
Definition at line 772 of file class.phpmailer.php.
|
protected |
Sends mail via SMTP using PhpSMTP Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
string | $header | The message headers |
string | $body | The message body SMTP protected |
Definition at line 701 of file class.phpmailer.php.
TextLine | ( | $value) |
Returns a formatted mail line. public
Definition at line 1326 of file class.phpmailer.php.
UTF8CharBoundary | ( | $encodedText, | |
$maxLength | |||
) |
Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string. Original written by Colin Brown. public
string | $encodedText | utf-8 QP text |
int | $maxLength | find last character boundary prior to this length |
Definition at line 1014 of file class.phpmailer.php.
|
static |
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 Original pattern found here string $address The email address to check boolean public
Definition at line 523 of file class.phpmailer.php.
WrapText | ( | $message, | |
$length, | |||
$qp_mode = false |
|||
) |
Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable. Original written by philippe.
string | $message | The message to wrap |
integer | $length | The line length to wrap to |
boolean | $qp_mode | Whether to run in Quoted-Printable mode public |
Definition at line 932 of file class.phpmailer.php.
$action_function = '' |
Definition at line 297 of file class.phpmailer.php.
$AltBody = '' |
Definition at line 119 of file class.phpmailer.php.
$Body = '' |
Definition at line 110 of file class.phpmailer.php.
$CharSet = 'iso-8859-1' |
Definition at line 59 of file class.phpmailer.php.
$ConfirmReadingTo = '' |
Definition at line 151 of file class.phpmailer.php.
$ContentType = 'text/plain' |
Definition at line 65 of file class.phpmailer.php.
$DKIM_domain = '' |
Definition at line 277 of file class.phpmailer.php.
$DKIM_identity = '' |
Definition at line 270 of file class.phpmailer.php.
$DKIM_private = '' |
Definition at line 284 of file class.phpmailer.php.
$DKIM_selector = 'phpmailer' |
Definition at line 263 of file class.phpmailer.php.
$Encoding = '8bit' |
Definition at line 72 of file class.phpmailer.php.
$ErrorInfo = '' |
Definition at line 78 of file class.phpmailer.php.
$From = 'root@localhost' |
Definition at line 84 of file class.phpmailer.php.
$FromName = 'Root User' |
Definition at line 90 of file class.phpmailer.php.
$Helo = '' |
Definition at line 192 of file class.phpmailer.php.
$Host = 'localhost' |
Definition at line 180 of file class.phpmailer.php.
$Hostname = '' |
Definition at line 159 of file class.phpmailer.php.
|
protected |
Definition at line 319 of file class.phpmailer.php.
$LE = "\n" |
Definition at line 257 of file class.phpmailer.php.
$Mailer = 'mail' |
Definition at line 132 of file class.phpmailer.php.
$MessageID = '' |
Definition at line 166 of file class.phpmailer.php.
$Password = '' |
Definition at line 217 of file class.phpmailer.php.
$PluginDir = '' |
Definition at line 145 of file class.phpmailer.php.
$Port = 25 |
Definition at line 186 of file class.phpmailer.php.
$Priority = 3 |
Definition at line 53 of file class.phpmailer.php.
$Sender = '' |
Definition at line 97 of file class.phpmailer.php.
$Sendmail = '/usr/sbin/sendmail' |
Definition at line 138 of file class.phpmailer.php.
$SingleTo = false |
Definition at line 245 of file class.phpmailer.php.
$SingleToArray = array() |
Definition at line 251 of file class.phpmailer.php.
$SMTPAuth = false |
Definition at line 205 of file class.phpmailer.php.
$SMTPDebug = false |
Definition at line 230 of file class.phpmailer.php.
$SMTPKeepAlive = false |
Definition at line 238 of file class.phpmailer.php.
$SMTPSecure = '' |
Definition at line 199 of file class.phpmailer.php.
$Subject = '' |
Definition at line 103 of file class.phpmailer.php.
$Timeout = 10 |
Definition at line 224 of file class.phpmailer.php.
$Username = '' |
Definition at line 211 of file class.phpmailer.php.
$Version = '5.1' |
Definition at line 303 of file class.phpmailer.php.
$WordWrap = 0 |
Definition at line 126 of file class.phpmailer.php.
const STOP_CONTINUE = 1 |
Definition at line 331 of file class.phpmailer.php.
const STOP_CRITICAL = 2 |
Definition at line 332 of file class.phpmailer.php.
const STOP_MESSAGE = 0 |
Definition at line 330 of file class.phpmailer.php.