Class PHPMailer

Description

PHPMailer - PHP email transport class

NOTE: Requires PHP version 5 or later

  • author: Jim Jagielski
  • author: Andy Prevost
  • author: Marcus Bointon
  • version: $Id: class.phpmailer.php 450 2010-06-23 16:46:33Z coolbru $
  • copyright: 2004 - 2009 Andy Prevost
  • copyright: 2010 - 2012 Jim Jagielski
  • license: GNU Lesser General Public License

Located in /class.phpmailer.php (line 40)


	
			
Class Constant Summary
Variable Summary
string $AltBody
mixed $attachment
mixed $bcc
string $Body
mixed $boundary
mixed $cc
string $CharSet
string $ContentType
string $DKIM_domain
string $DKIM_private
string $Encoding
string $ErrorInfo
mixed $error_count
mixed $exceptions
string $From
string $FromName
string $Helo
string $Host
string $Hostname
mixed $language
string $LE
string $Mailer
string $MessageID
string $MIMEBody
string $MIMEHeader
string $Password
string $PluginDir
int $Port
int $Priority
mixed $ReplyTo
string $Sender
string $Sendmail
bool $SingleTo
mixed $smtp
bool $SMTPAuth
bool $SMTPDebug
string $SMTPSecure
string $Subject
int $Timeout
mixed $to
string $Username
string $Version
int $WordWrap
string $XMailer
Method Summary
static string RFCDate ()
static boolean ValidateAddress (string $address)
static string _mime_types ([string $ext = ''])
PHPMailer __construct ([boolean $exceptions = false])
boolean AddAddress (string $address, [string $name = ''])
boolean AddAnAddress (string $kind, string $address, [string $name = ''])
bool AddAttachment (string $path, [string $name = ''], [string $encoding = 'base64'], [string $type = 'application/octet-stream'])
boolean AddBCC (string $address, [string $name = ''])
boolean AddCC (string $address, [string $name = ''])
void AddCustomHeader ( $custom_header)
bool AddEmbeddedImage (string $path, string $cid, [string $name = ''], [string $encoding = 'base64'], [string $type = 'application/octet-stream'])
string AddrAppend ( $type,  $addr)
boolean AddReplyTo (string $address, [string $name = ''])
string AddrFormat ( $addr)
void AddStringAttachment (string $string, string $filename, [string $encoding = 'base64'], [string $type = 'application/octet-stream'])
void AddStringEmbeddedImage ( $string,  $cid, [ $filename = ''], [ $encoding = 'base64'], [ $type = 'application/octet-stream'])
string AttachAll ( $disposition_type,  $boundary)
string Base64EncodeWrapMB (string $str)
void ClearAddresses ()
void ClearBCCs ()
void ClearCCs ()
void ClearReplyTos ()
string CreateBody ()
string CreateHeader ()
void DKIM_Add (string $headers_line, string $subject, string $body)
void DKIM_BodyC (string $body)
void DKIM_HeaderC (string $s)
void DKIM_QP ( $txt, string $key_filename, string $key_pass)
void DKIM_Sign (string $s)
void doCallback ( $isSent,  $to,  $cc,  $bcc,  $subject,  $body)
string EncodeFile (string $path, [string $encoding = 'base64'])
string EncodeHeader ( $str, [ $position = 'text'])
string EncodeQ (string $str, [string $position = 'text'])
string EncodeQP (string $string, [integer $line_max = 76], [boolean $space_conv = false])
string EncodeQPphp ([ $input = ''], [integer $line_max = 76], [ $space_conv = false], string $string)
string EncodeString (string $str, [string $encoding = 'base64'])
string EndBoundary ( $boundary)
string FixEOL ( $str)
array GetAttachments ()
string GetBoundary ( $boundary,  $charSet,  $contentType,  $encoding)
string GetMailMIME ()
string GetSentMIMEMessage ()
array GetTranslations ()
bool HasMultiBytes (string $str)
string HeaderLine ( $name,  $value)
bool IsError ()
void IsHTML ([bool $ishtml = true])
void IsMail ()
void IsQmail ()
void IsSendmail ()
void IsSMTP ()
string Lang ( $key)
bool MailSend (string $header, string $body)
$message MsgHTML ( $message, [ $basedir = ''])
void PostSend ()
void PreSend ()
string SecureHeader (string $str)
bool Send ()
bool SendmailSend (string $header, string $body)
string ServerHostname ()
void set (string $name, [mixed $value = ''])
void SetError ( $msg)
boolean SetFrom (string $address, [string $name = ''], [ $auto = 1])
void SetLanguage ([string $langcode = 'en'], [string $lang_path = '/usr/share/php/phpmailer/language/'])
void SetMessageType ()
void SetWordWrap ()
void Sign ( $cert_filename, string $key_filename, string $key_pass)
void SmtpClose ()
bool SmtpConnect ()
bool SmtpSend (string $header, string $body)
string TextLine ( $value)
int UTF8CharBoundary (string $encodedText, int $maxLength)
string WrapText (string $message, integer $length, [boolean $qp_mode = false])
Variables
string $action_function = '' (line 321)

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

  • access: public
mixed $all_recipients = array() (line 344)
  • access: protected
string $AltBody = '' (line 116)

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.

  • access: public
mixed $attachment = array() (line 345)
  • access: protected
mixed $bcc = array() (line 342)
  • access: protected
string $Body = '' (line 107)

Sets the Body of the message. This can be either an HTML or text body.

If HTML then run IsHTML(true).

  • access: public
mixed $boundary = array() (line 348)
  • access: protected
mixed $cc = array() (line 341)
  • access: protected
string $CharSet = 'iso-8859-1' (line 56)

Sets the CharSet of the message.

  • access: public
string $ConfirmReadingTo = '' (line 169)

Sets the email address that a reading confirmation will be sent.

  • access: public
string $ContentType = 'text/plain' (line 62)

Sets the Content-type of the message.

  • access: public
mixed $CustomHeader = array() (line 346)
  • access: protected
string $DKIM_domain = '' (line 301)

Used with DKIM DNS Resource Record

optional, in format of email address 'you@yourdomain.com'

  • access: public
string $DKIM_identity = '' (line 288)

Used with DKIM DNS Resource Record

optional, in format of email address 'you@yourdomain.com'

  • access: public
string $DKIM_passphrase = '' (line 294)

Used with DKIM DNS Resource Record

  • access: public
string $DKIM_private = '' (line 308)

Used with DKIM DNS Resource Record

optional, in format of email address 'you@yourdomain.com'

  • access: public
string $DKIM_selector = 'phpmailer' (line 281)

Used with DKIM DNS Resource Record

  • access: public
string $Encoding = '8bit' (line 69)

Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".

  • access: public
string $ErrorInfo = '' (line 75)

Holds the most recent mailer error message.

  • access: public
mixed $error_count = 0 (line 350)
  • access: protected
mixed $exceptions = false (line 354)
  • access: protected
string $From = 'root@localhost' (line 81)

Sets the From email address for the message.

  • access: public
string $FromName = 'Root User' (line 87)

Sets the From name of the message.

  • access: public
string $Helo = '' (line 210)

Sets the SMTP HELO of the message (Default is $Hostname).

  • access: public
string $Host = 'localhost' (line 198)

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.

  • access: public
string $Hostname = '' (line 177)

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'.

  • access: public
mixed $language = array() (line 349)
  • access: protected
string $LE = "\n" (line 275)

Provides the ability to change the line ending

  • access: public
string $Mailer = 'mail' (line 150)

Method to send mail: ("mail", "sendmail", or "smtp").

  • access: public
string $MessageID = '' (line 184)

Sets the message ID to be used in the Message-Id header.

If empty, a unique id will be generated.

  • access: public
mixed $message_type = '' (line 347)
  • access: protected
string $MIMEBody = '' (line 123)

Stores the complete compiled MIME message body.

  • access: protected
string $MIMEHeader = '' (line 130)

Stores the complete compiled MIME message headers.

  • access: protected
string $Password = '' (line 235)

Sets SMTP password.

  • access: public
string $PluginDir = '/usr/share/php/phpmail/' (line 163)

Path to PHPMailer plugins. Useful if the SMTP class is in a different directory than the PHP include path.

  • access: public
int $Port = 25 (line 204)

Sets the default SMTP server port.

  • access: public
int $Priority = 3 (line 50)

Email priority (1 = High, 3 = Normal, 5 = low).

  • access: public
mixed $ReplyTo = array() (line 343)
  • access: protected
string $Sender = '' (line 94)

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.

  • access: public
string $Sendmail = '/usr/sbin/sendmail' (line 156)

Sets the path of the sendmail program.

  • access: public
string $SentMIMEMessage = '' (line 137)

Stores the complete sent MIME message (Body and Headers)

  • access: protected
mixed $sign_cert_file = '' (line 351)
  • access: protected
mixed $sign_key_file = '' (line 352)
  • access: protected
mixed $sign_key_pass = '' (line 353)
  • access: protected
bool $SingleTo = false (line 263)

Provides the ability to have the TO field process individual

emails, instead of sending to entire TO addresses

  • access: public
bool $SingleToArray = array() (line 269)

If SingleTo is true, this provides the array to hold the email addresses

  • access: public
mixed $smtp = NULL (line 339)
  • access: protected
bool $SMTPAuth = false (line 223)

Sets SMTP authentication. Utilizes the Username and Password variables.

  • access: public
bool $SMTPDebug = false (line 248)

Sets SMTP class debugging on or off.

  • access: public
bool $SMTPKeepAlive = false (line 256)

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().

  • access: public
string $SMTPSecure = '' (line 217)

Sets connection prefix.

Options are "", "ssl" or "tls"

  • access: public
string $Subject = '' (line 100)

Sets the Subject of the message.

  • access: public
int $Timeout = 10 (line 242)

Sets the SMTP server timeout in seconds.

This function will not work with the win32 version.

  • access: public
mixed $to = array() (line 340)
  • access: protected
string $Username = '' (line 229)

Sets SMTP username.

  • access: public
string $Version = '5.2.1' (line 327)

Sets the PHPMailer Version number

  • access: public
int $WordWrap = 0 (line 144)

Sets word wrapping on the body of the message to a given number of characters.

  • access: public
string $XMailer = '' (line 333)

What to use in the X-Mailer header

  • access: public
Methods
static method RFCDate (line 2133)

Returns the proper RFC 822 formatted date.

  • access: public
static string RFCDate ()
static method ValidateAddress (line 563)

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

static boolean ValidateAddress (string $address)
  • string $address: The email address to check
static method _mime_types (line 2253)

Gets the MIME type of the embedded or inline image

  • return: MIME type of ext
  • access: public
static string _mime_types ([string $ext = ''])
  • string $ext: File extension
Constructor __construct (line 372)

Constructor

  • access: public
PHPMailer __construct ([boolean $exceptions = false])
  • boolean $exceptions: Should we throw external exceptions?
AddAddress (line 437)

Adds a "To" address.

  • return: true on success, false if address already used
  • access: public
boolean AddAddress (string $address, [string $name = ''])
  • string $address
  • string $name
AddAnAddress (line 482)

Adds an address to one of the recipient arrays

Addresses that have been added already return false, but do not throw exceptions

  • return: true on success, false if address already used or invalid in some way
  • access: protected
boolean AddAnAddress (string $kind, string $address, [string $name = ''])
  • string $kind: One of 'to', 'cc', 'bcc', 'ReplyTo'
  • string $address: The email address to send to
  • string $name
AddAttachment (line 1510)

Adds an attachment from a path on the filesystem.

Returns false if the file could not be found or accessed.

  • access: public
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.
AddBCC (line 459)

Adds a "Bcc" address.

Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.

  • return: true on success, false if address already used
  • access: public
boolean AddBCC (string $address, [string $name = ''])
  • string $address
  • string $name
AddCC (line 448)

Adds a "Cc" address.

Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.

  • return: true on success, false if address already used
  • access: public
boolean AddCC (string $address, [string $name = ''])
  • string $address
  • string $name
AddCustomHeader (line 2203)

Adds a custom header.

  • access: public
void AddCustomHeader ( $custom_header)
  • $custom_header
AddEmbeddedImage (line 1965)

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".

  • access: public
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.
AddrAppend (line 991)

Creates recipient headers.

  • access: public
string AddrAppend ( $type,  $addr)
  • $type
  • $addr
AddReplyTo (line 469)

Adds a "Reply-to" address.

  • access: public
boolean AddReplyTo (string $address, [string $name = ''])
  • string $address
  • string $name
AddrFormat (line 1008)

Formats an address correctly.

  • access: public
string AddrFormat ( $addr)
  • $addr
AddStringAttachment (line 1938)

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.

  • access: public
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.
AddStringEmbeddedImage (line 1992)
  • access: public
void AddStringEmbeddedImage ( $string,  $cid, [ $filename = ''], [ $encoding = 'base64'], [ $type = 'application/octet-stream'])
  • $string
  • $cid
  • $filename
  • $encoding
  • $type
AlternativeExists (line 2029)
  • access: public
void AlternativeExists ()
AttachAll (line 1560)

Attaches all fs, string, and binary attachments to the message.

Returns an empty string on failure.

  • access: protected
string AttachAll ( $disposition_type,  $boundary)
  • $disposition_type
  • $boundary
AttachmentExists (line 2020)
  • access: public
void AttachmentExists ()
Base64EncodeWrapMB (line 1781)

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

  • access: public
string Base64EncodeWrapMB (string $str)
  • string $str: multi-byte text to wrap encode
ClearAddresses (line 2041)

Clears all recipients assigned in the TO array. Returns void.

  • access: public
void ClearAddresses ()
ClearAllRecipients (line 2083)

Clears all recipients assigned in the TO, CC and BCC array. Returns void.

  • access: public
void ClearAllRecipients ()
ClearAttachments (line 2095)

Clears all previously set filesystem, string, and binary attachments. Returns void.

  • access: public
void ClearAttachments ()
ClearBCCs (line 2063)

Clears all recipients assigned in the BCC array. Returns void.

  • access: public
void ClearBCCs ()
ClearCCs (line 2052)

Clears all recipients assigned in the CC array. Returns void.

  • access: public
void ClearCCs ()
ClearCustomHeaders (line 2103)

Clears all custom headers. Returns void.

  • access: public
void ClearCustomHeaders ()
ClearReplyTos (line 2074)

Clears all recipients assigned in the ReplyTo array. Returns void.

  • access: public
void ClearReplyTos ()
CreateBody (line 1304)

Assembles the message body. Returns an empty string on failure.

  • return: The assembled message body
  • access: public
string CreateBody ()
CreateHeader (line 1169)

Assembles message header.

  • return: The assembled header
  • access: public
string CreateHeader ()
DKIM_Add (line 2483)

Create the DKIM header, body, as new header

  • access: public
void DKIM_Add (string $headers_line, string $subject, string $body)
  • string $headers_line: Header lines
  • string $subject: Subject
  • string $body: Body
DKIM_BodyC (line 2463)

Generate DKIM Canonicalization Body

  • access: public
void DKIM_BodyC (string $body)
  • string $body: Message Body
DKIM_HeaderC (line 2444)

Generate DKIM Canonicalization Header

  • access: public
void DKIM_HeaderC (string $s)
  • string $s: Header
DKIM_QP (line 2406)

Set the private key file and password to sign the message.

  • access: public
void DKIM_QP ( $txt, string $key_filename, string $key_pass)
  • string $key_filename: Parameter File Name
  • string $key_pass: Password for private key
  • $txt
DKIM_Sign (line 2426)

Generate DKIM signature

  • access: public
void DKIM_Sign (string $s)
  • string $s: Header
doCallback (line 2518)
  • access: protected
void doCallback ( $isSent,  $to,  $cc,  $bcc,  $subject,  $body)
  • $isSent
  • $to
  • $cc
  • $bcc
  • $subject
  • $body
EncodeFile (line 1631)

Encodes attachment in requested format.

Returns an empty string on failure.

string EncodeFile (string $path, [string $encoding = 'base64'])
  • string $path: The full path to the file
  • string $encoding: The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
EncodeHeader (line 1704)

Encode a header string to best (shortest) of Q, B, quoted or none.

  • access: public
string EncodeHeader ( $str, [ $position = 'text'])
  • $str
  • $position
EncodeQ (line 1903)

Encode string to q encoding.

string EncodeQ (string $str, [string $position = 'text'])
  • string $str: the text to encode
  • string $position: Where the text is going to be used, see the RFC for what that means
EncodeQP (line 1874)

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 EncodeQP (string $string, [integer $line_max = 76], [boolean $space_conv = false])
  • 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
EncodeQPphp (line 1821)

Encode string to quoted-printable.

Only uses standard PHP, slow, but will always work

  • access: public
string EncodeQPphp ([ $input = ''], [integer $line_max = 76], [ $space_conv = false], string $string)
  • string $string: the text to encode
  • integer $line_max: Number of chars allowed on a line before wrapping
  • $input
  • $space_conv
EncodeString (line 1673)

Encodes string to requested format.

Returns an empty string on failure.

  • access: public
string EncodeString (string $str, [string $encoding = 'base64'])
  • string $str: The text to encode
  • string $encoding: The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
EndBoundary (line 1460)

Returns the end of a message boundary.

  • access: protected
string EndBoundary ( $boundary)
  • $boundary
FixEOL (line 2191)

Changes every end of line from CR or LF to CRLF.

  • access: public
string FixEOL ( $str)
  • $str
GetAttachments (line 1550)

Return the current array of attachments

  • access: public
array GetAttachments ()
GetBoundary (line 1435)

Returns the start of a message boundary.

  • access: protected
string GetBoundary ( $boundary,  $charSet,  $contentType,  $encoding)
  • $boundary
  • $charSet
  • $contentType
  • $encoding
GetMailMIME (line 1257)

Returns the message MIME.

  • access: public
string GetMailMIME ()
GetSentMIMEMessage (line 1294)

Returns the MIME message (headers and body). Only really valid post PreSend().

  • access: public
string GetSentMIMEMessage ()
GetTranslations (line 978)

Return the current array of language strings

  • access: public
array GetTranslations ()
HasMultiBytes (line 1765)

Checks if a string contains multibyte characters.

  • access: public
bool HasMultiBytes (string $str)
  • string $str: multi-byte text to wrap encode
HeaderLine (line 1483)

Returns a formatted header line.

  • access: public
string HeaderLine ( $name,  $value)
  • $name
  • $value
InlineImageExists (line 2011)

Returns true if an inline attachment is present.

  • access: public
bool InlineImageExists ()
IsError (line 2182)

Returns true if an error occurred.

  • access: public
bool IsError ()
IsHTML (line 381)

Sets message type to HTML.

  • access: public
void IsHTML ([bool $ishtml = true])
  • bool $ishtml
IsMail (line 401)

Sets Mailer to send message using PHP mail() function.

  • access: public
void IsMail ()
IsQmail (line 420)

Sets Mailer to send message using the qmail MTA.

  • access: public
void IsQmail ()
IsSendmail (line 409)

Sets Mailer to send message using the $Sendmail program.

  • access: public
void IsSendmail ()
IsSMTP (line 393)

Sets Mailer to send message using SMTP.

  • access: public
void IsSMTP ()
Lang (line 2165)

Returns a message in the appropriate language.

  • access: protected
string Lang ( $key)
  • $key
MailSend (line 732)

Sends mail using the PHP mail() function.

  • access: protected
bool MailSend (string $header, string $body)
  • string $header: The message headers
  • string $body: The message body
MsgHTML (line 2212)

Evaluates the message and returns modifications for inline images and backgrounds

  • access: public
$message MsgHTML ( $message, [ $basedir = ''])
  • $message
  • $basedir
PostSend (line 653)
  • access: protected
void PostSend ()
PreSend (line 599)
  • access: protected
void PreSend ()
SecureHeader (line 2380)

Strips newlines to prevent header injection.

  • access: public
string SecureHeader (string $str)
  • string $str: String
Send (line 585)

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.

  • access: public
bool Send ()
SendmailSend (line 686)

Sends mail using the $Sendmail program.

  • access: protected
bool SendmailSend (string $header, string $body)
  • string $header: The message headers
  • string $body: The message body
ServerHostname (line 2148)

Returns the server hostname or 'localhost.localdomain' if unknown.

  • access: protected
string ServerHostname ()
set (line 2358)

Set (or reset) Class Objects (variables)

Usage Example: $page->set('X-Priority', '3');

  • todo: Should this not be using __set() magic function?
  • access: public
void set (string $name, [mixed $value = ''])
  • string $name: Parameter Name
  • mixed $value: Parameter Value NOTE: will not work with arrays, there are no arrays to set/reset
SetError (line 2116)

Adds the error message to the error container.

  • access: protected
void SetError ( $msg)
  • $msg
SetFrom (line 526)

Set the From and FromName properties

  • access: public
boolean SetFrom (string $address, [string $name = ''], [ $auto = 1])
  • string $address
  • string $name
  • $auto
SetLanguage (line 944)

Sets the language for all class error messages.

Returns false if it cannot load the language file. The default language is English.

  • access: public
void SetLanguage ([string $langcode = 'en'], [string $lang_path = '/usr/share/php/phpmailer/language/'])
  • string $langcode: ISO 639-1 2-character language code (e.g. Portuguese: "br")
  • string $lang_path: Path to the language file directory
SetMessageType (line 1469)

Sets the message type.

  • access: protected
void SetMessageType ()
SetWordWrap (line 1146)

Set the body wrapping.

  • access: public
void SetWordWrap ()
Sign (line 2393)

Set the private key file and password to sign the message.

  • access: public
void Sign ( $cert_filename, string $key_filename, string $key_pass)
  • string $key_filename: Parameter File Name
  • string $key_pass: Password for private key
  • $cert_filename
SmtpClose (line 928)

Closes the active SMTP session if one exists.

  • access: public
void SmtpClose ()
SmtpConnect (line 864)

Initiates a connection to an SMTP server.

Returns false if the operation failed.

  • access: public
  • uses: SMTP
bool SmtpConnect ()
SmtpSend (line 793)

Sends mail via SMTP using PhpSMTP Returns false if there is a bad MAIL FROM, RCPT, or DATA input.

  • access: protected
  • uses: SMTP
bool SmtpSend (string $header, string $body)
  • string $header: The message headers
  • string $body: The message body
TextLine (line 1492)

Returns a formatted mail line.

  • access: public
string TextLine ( $value)
  • $value
UTF8CharBoundary (line 1108)

Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string.

Original written by Colin Brown.

  • access: public
int UTF8CharBoundary (string $encodedText, int $maxLength)
  • string $encodedText: utf-8 QP text
  • int $maxLength: find last character boundary prior to this length
WrapText (line 1026)

Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.

Original written by philippe.

  • access: public
string WrapText (string $message, integer $length, [boolean $qp_mode = false])
  • string $message: The message to wrap
  • integer $length: The line length to wrap to
  • boolean $qp_mode: Whether to run in Quoted-Printable mode
Class Constants
STOP_CONTINUE = 1 (line 361)
STOP_CRITICAL = 2 (line 362)
STOP_MESSAGE = 0 (line 360)

Documentation generated on Fri, 24 Aug 2012 01:16:45 +0200 by phpDocumentor 1.4.4