Class PHPMailer

Description

PHPMailer - PHP email creation and transport class.

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


	
			
Direct descendents
Class Description
PHPMailerOAuth PHPMailerOAuth - PHPMailer subclass adding OAuth support.
Method Summary
static string filenameToType (string $filename)
static boolean hasLineLongerThanMax (string $str)
static string|array mb_pathinfo (string $path, [integer|string $options = null])
static string normalizeBreaks (string $text, [string $breaktype = "\r\n"])
static string rfcDate ()
static boolean validateAddress (string $address, [string $patternselect = 'auto'])
static string _mime_types ([string $ext = ''])
PHPMailer __construct ([boolean $exceptions = false])
void __destruct ()
boolean addAddress (string $address, [string $name = ''])
boolean addAnAddress (string $kind, string $address, [string $name = ''])
boolean addAttachment (string $path, [string $name = ''], [string $encoding = 'base64'], [string $type = ''], [string $disposition = 'attachment'])
boolean addBCC (string $address, [string $name = ''])
boolean addCC (string $address, [string $name = ''])
void addCustomHeader (string $name, [string $value = null])
boolean addEmbeddedImage (string $path, string $cid, [string $name = ''], [string $encoding = 'base64'], [string $type = ''], [string $disposition = 'inline'])
string addrAppend (string $type, array $addr)
boolean addReplyTo (string $address, [string $name = ''])
string addrFormat (array $addr)
void addStringAttachment (string $string, string $filename, [string $encoding = 'base64'], [string $type = ''], [string $disposition = 'attachment' ])
boolean addStringEmbeddedImage (string $string, string $cid, [string $name = ''], [string $encoding = 'base64'], [string $type = ''], [string $disposition = 'inline' ])
boolean alternativeExists ()
string attachAll (string $disposition_type, string $boundary)
boolean attachmentExists ()
string base64EncodeWrapMB (string $str, [string $linebreak = null])
void clearAddresses ()
void clearBCCs ()
void clearCCs ()
void clearReplyTos ()
string createBody ()
string createHeader ()
string DKIM_Add (string $headers_line, string $subject, string $body)
string DKIM_BodyC (string $body)
string DKIM_HeaderC (string $signHeader)
string DKIM_QP (string $txt)
string DKIM_Sign (string $signHeader)
void doCallback (boolean $isSent, array $to, array $cc, array $bcc, string $subject, string $body, string $from)
void edebug (string $str)
string encodeFile (string $path, [string $encoding = 'base64'])
string encodeHeader (string $str, [string $position = 'text'])
string encodeQ (string $str, [string $position = 'text'])
string encodeQP (string $string, [integer $line_max = 76])
string encodeQPphp (string $string, [integer $line_max = 76], [boolean $space_conv = false ])
string encodeString (string $str, [string $encoding = 'base64'])
string endBoundary (string $boundary)
string fixEOL (string $str)
array getAttachments ()
array getBccAddresses ()
string getBoundary (string $boundary, string $charSet, string $contentType, string $encoding)
array getCcAddresses ()
array getCustomHeaders ()
string getLastMessageID ()
string getMailMIME ()
string getSentMIMEMessage ()
array getToAddresses ()
array getTranslations ()
boolean has8bitChars (string $text)
boolean hasMultiBytes (string $str)
string headerLine (string $name, string $value)
string html2text (string $html, [boolean|callable $advanced = false])
boolean inlineImageExists ()
boolean isError ()
void isHTML ([boolean $isHtml = true])
void isMail ()
void isQmail ()
void isSendmail ()
void isSMTP ()
string lang (string $key)
boolean mailSend (string $header, string $body)
string msgHTML (string $message, [string $basedir = ''], [boolean|callable $advanced = false])
array parseAddresses (string $addrstr, [bool $useimap = true])
boolean postSend ()
boolean preSend ()
string secureHeader (string $str)
boolean send ()
boolean sendmailSend (string $header, string $body)
string serverHostname ()
boolean set (string $name, [mixed $value = ''])
void setError (string $msg)
boolean setFrom (string $address, [string $name = ''], [boolean $auto = true])
boolean setLanguage ([string $langcode = 'en'], [string $lang_path = ''])
void setMessageType ()
void setWordWrap ()
void sign (string $cert_filename, string $key_filename, string $key_pass, [string $extracerts_filename = ''])
void smtpClose ()
boolean smtpConnect ([array $options = array()])
boolean smtpSend (string $header, string $body)
string textLine (string $value)
integer utf8CharBoundary (string $encodedText, integer $maxLength)
string wrapText (string $message, integer $length, [boolean $qp_mode = false])
Methods
static method filenameToType (line 3337)

Map a file name to a MIME type. Defaults to 'application/octet-stream', i.e..

arbitrary binary data.

static string filenameToType (string $filename)
  • string $filename: A file name or full path, does not need to exist as a file
static method hasLineLongerThanMax (line 3627)

Detect if a string contains a line longer than the maximum line length allowed.

static boolean hasLineLongerThanMax (string $str)
  • string $str
static method mb_pathinfo (line 3359)

Multi-byte-safe pathinfo replacement.

Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. Works similarly to the one in PHP >= 5.2.0

static string|array mb_pathinfo (string $path, [integer|string $options = null])
  • string $path: A filename or path, does not need to exist as a file
  • integer|string $options: Either a PATHINFO_* constant, or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2
static method normalizeBreaks (line 3441)

Normalize line breaks in a string.

Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. Defaults to CRLF (for message bodies) and preserves consecutive breaks.

  • access: public
static string normalizeBreaks (string $text, [string $breaktype = "\r\n"])
  • string $text
  • string $breaktype: What kind of line break to use, defaults to CRLF
static method rfcDate (line 2995)

Return an RFC 822 formatted date.

  • access: public
static string rfcDate ()
static method validateAddress (line 977)

Check that a string looks like an email address.

  • access: public
static boolean validateAddress (string $address, [string $patternselect = 'auto'])
  • string $address: The email address to check
  • string $patternselect: A selector for the validation pattern to use : * `auto` Pick strictest one automatically; * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; * `pcre` Use old PCRE implementation; * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; same as pcre8 but does not allow 'dotless' domains; * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. * `noregex` Don't use a regex: super fast, really dumb.
static method _mime_types (line 3222)

Get the MIME type for a file extension.

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

Constructor.

PHPMailer __construct ([boolean $exceptions = false])
  • boolean $exceptions: Should we throw external exceptions?
Destructor __destruct (line 631)

Destructor.

void __destruct ()
addAddress (line 781)

Add a "To" address.

  • return: true on success, false if address already used
boolean addAddress (string $address, [string $name = ''])
  • string $address
  • string $name
addAnAddress (line 831)

Add 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
  • throws: phpmailerException
  • 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 2250)

Add an attachment from a path on the filesystem.

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

  • throws: phpmailerException
boolean addAttachment (string $path, [string $name = ''], [string $encoding = 'base64'], [string $type = ''], [string $disposition = 'attachment'])
  • string $path: Path to the attachment.
  • string $name: Overrides the attachment name.
  • string $encoding: File encoding (see $Encoding).
  • string $type: File extension (MIME) type.
  • string $disposition: Disposition to use
addBCC (line 805)

Add a "BCC" address.

  • return: true on success, false if address already used
boolean addBCC (string $address, [string $name = ''])
  • string $address
  • string $name
addCC (line 793)

Add a "CC" address.

  • return: true on success, false if address already used
boolean addCC (string $address, [string $name = ''])
  • string $address
  • string $name
addCustomHeader (line 3087)

Add a custom header.

$name value can be overloaded to contain both header name and value (name:value)

  • access: public
void addCustomHeader (string $name, [string $value = null])
  • string $name: Custom header name
  • string $value: Header value
addEmbeddedImage (line 2777)

Add an embedded (inline) attachment from a file.

This can include images, sounds, and just about any other document type. These differ from 'regular' attachments in that they are intended to be displayed inline with the message, not just attached for download. This is used in HTML messages that embed the images the HTML refers to using the $cid value.

  • return: True on successfully adding an attachment
boolean addEmbeddedImage (string $path, string $cid, [string $name = ''], [string $encoding = 'base64'], [string $type = ''], [string $disposition = 'inline'])
  • string $path: Path to the attachment.
  • string $cid: Content ID of the attachment; Use this to reference the content when using an embedded image in HTML.
  • string $name: Overrides the attachment name.
  • string $encoding: File encoding (see $Encoding).
  • string $type: File MIME type.
  • string $disposition: Disposition to use
addrAppend (line 1576)

Create recipient headers.

  • access: public
string addrAppend (string $type, array $addr)
  • string $type
  • array $addr: An array of recipient,
addReplyTo (line 816)

Add a "Reply-to" address.

boolean addReplyTo (string $address, [string $name = ''])
  • string $address
  • string $name
addrFormat (line 1592)

Format an address for use in a message header.

  • access: public
string addrFormat (array $addr)
  • array $addr: A 2-element indexed array, element 0 containing an address, element 1 containing a name like array('joe@example.com', 'Joe User')
addStringAttachment (line 2737)

Add a string or binary attachment (non-filesystem).

This method can be used to attach ascii or binary data, such as a BLOB record from a database.

void addStringAttachment (string $string, string $filename, [string $encoding = 'base64'], [string $type = ''], [string $disposition = 'attachment' ])
  • string $string: String attachment data.
  • string $filename: Name of the attachment.
  • string $encoding: File encoding (see $Encoding).
  • string $type: File extension (MIME) type.
  • string $disposition: Disposition to use
addStringEmbeddedImage (line 2822)

Add an embedded stringified attachment.

This can include images, sounds, and just about any other document type. Be sure to set the $type to an image type for images: JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'.

  • return: True on successfully adding an attachment
boolean addStringEmbeddedImage (string $string, string $cid, [string $name = ''], [string $encoding = 'base64'], [string $type = ''], [string $disposition = 'inline' ])
  • string $string: The attachment binary data.
  • string $cid: Content ID of the attachment; Use this to reference the content when using an embedded image in HTML.
  • string $name
  • string $encoding: File encoding (see $Encoding).
  • string $type: MIME type.
  • string $disposition: Disposition to use
alternativeExists (line 2882)

Check if this message has an alternative body set.

boolean alternativeExists ()
attachAll (line 2306)

Attach all file, string, and binary attachments to the message.

Returns an empty string on failure.

  • access: protected
string attachAll (string $disposition_type, string $boundary)
  • string $disposition_type
  • string $boundary
attachmentExists (line 2868)

Check if an attachment (non-inline) is present.

boolean attachmentExists ()
base64EncodeWrapMB (line 2602)

Encode and wrap long multibyte strings for mail headers without breaking lines within a character.

Adapted from a function by paravoid

string base64EncodeWrapMB (string $str, [string $linebreak = null])
  • string $str: multi-byte text to wrap encode
  • string $linebreak: string to use as linefeed/end-of-line
clearAddresses (line 2891)

Clear all To recipients.

void clearAddresses ()
clearAllRecipients (line 2936)

Clear all recipient types.

void clearAllRecipients ()
clearAttachments (line 2948)

Clear all filesystem, string, and binary attachments.

void clearAttachments ()
clearBCCs (line 2915)

Clear all BCC recipients.

void clearBCCs ()
clearCCs (line 2903)

Clear all CC recipients.

void clearCCs ()
clearCustomHeaders (line 2957)

Clear all custom headers.

void clearCustomHeaders ()
clearReplyTos (line 2927)

Clear all ReplyTo recipients.

void clearReplyTos ()
createBody (line 1946)

Assemble the message body.

Returns an empty string on failure.

  • return: The assembled message body
  • throws: phpmailerException
  • access: public
string createBody ()
createHeader (line 1782)

Assemble message headers.

  • return: The assembled headers
  • access: public
string createHeader ()
DKIM_Add (line 3559)

Create the DKIM header and body in a new message header.

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

Generate a DKIM canonicalization body.

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

Generate a DKIM canonicalization header.

  • access: public
string DKIM_HeaderC (string $signHeader)
  • string $signHeader: Header
DKIM_QP (line 3469)

Quoted-Printable-encode a DKIM header.

  • access: public
string DKIM_QP (string $txt)
  • string $txt
DKIM_Sign (line 3490)

Generate a DKIM signature.

  • throws: phpmailerException
  • access: public
string DKIM_Sign (string $signHeader)
  • string $signHeader
doCallback (line 3693)

Perform a callback.

void doCallback (boolean $isSent, array $to, array $cc, array $bcc, string $subject, string $body, string $from)
  • boolean $isSent
  • array $to
  • array $cc
  • array $bcc
  • string $subject
  • string $body
  • string $from
edebug (line 675)

Output debugging info via user-defined method.

Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).

  • see: PHPMailer::$SMTPDebug @
  • see: PHPMailer::$Debugoutput @
void edebug (string $str)
  • string $str
encodeFile (line 2432)

Encode a file attachment in requested format.

Returns an empty string on failure.

  • see: EncodeFile(encodeFile @
  • throws: phpmailerException
  • access: protected
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 2509)

Encode a header string optimally.

Picks shortest of Q, B, quoted-printable or none.

  • access: public
string encodeHeader (string $str, [string $position = 'text'])
  • string $str
  • string $position
encodeQ (line 2685)

Encode a string using 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 2644)

Encode a string in quoted-printable format.

According to RFC2045 section 6.7.

string encodeQP (string $string, [integer $line_max = 76])
  • string $string: The text to encode
  • integer $line_max: Number of chars allowed on a line before wrapping
encodeQPphp (line 2669)

Backward compatibility wrapper for an old QP encoding function that was removed.

  • see: PHPMailer::encodeQP() @
  • deprecated: Use encodeQP instead.
  • access: public
string encodeQPphp (string $string, [integer $line_max = 76], [boolean $space_conv = false ])
  • string $string
  • integer $line_max
  • boolean $space_conv
encodeString (line 2473)

Encode a string in 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 2186)

Return the end of a message boundary.

  • access: protected
string endBoundary (string $boundary)
  • string $boundary
fixEOL (line 3067)

Ensure consistent line endings in a string.

Changes every end of line from CRLF, CR or LF to $this->LE.

  • access: public
string fixEOL (string $str)
  • string $str: String to fixEOL
getAllRecipientAddresses (line 3678)

Allows for public read access to 'all_recipients' property.

  • access: public
array getAllRecipientAddresses ()
getAttachments (line 2293)

Return the array of attachments.

array getAttachments ()
getBccAddresses (line 3658)

Allows for public read access to 'bcc' property.

  • access: public
array getBccAddresses ()
getBoundary (line 2156)

Return the start of a message boundary.

  • access: protected
string getBoundary (string $boundary, string $charSet, string $contentType, string $encoding)
  • string $boundary
  • string $charSet
  • string $contentType
  • string $encoding
getCcAddresses (line 3648)

Allows for public read access to 'cc' property.

  • access: public
array getCcAddresses ()
getCustomHeaders (line 3102)

Returns all custom headers

array getCustomHeaders ()
getLastMessageID (line 958)

Return the Message-ID header of the last email.

Technically this is the value from the last time the headers were created, but it's also the message ID of the last sent message except in pathological cases.

string getLastMessageID ()
getMailMIME (line 1879)

Get the message MIME type headers.

  • access: public
string getMailMIME ()
getReplyToAddresses (line 3668)

Allows for public read access to 'ReplyTo' property.

  • access: public
array getReplyToAddresses ()
getSentMIMEMessage (line 1934)

Returns the whole MIME message.

Includes complete headers and body. Only valid post preSend().

  • see: PHPMailer::preSend() @
  • access: public
string getSentMIMEMessage ()
getSMTPInstance (line 1298)

Get an instance to use for SMTP operations.

Override this function to load your own SMTP implementation

SMTP getSMTPInstance ()
getToAddresses (line 3638)

Allows for public read access to 'to' property.

  • access: public
array getToAddresses ()
getTranslations (line 1561)

Get the array of strings for the current language.

array getTranslations ()
has8bitChars (line 2587)

Does a string contain any 8-bit chars (in any charset)?

boolean has8bitChars (string $text)
  • string $text
hasMultiBytes (line 2573)

Check if a string contains multi-byte characters.

  • access: public
boolean hasMultiBytes (string $str)
  • string $str: multi-byte text to wrap encode
headerLine (line 2223)

Format a header line.

  • access: public
string headerLine (string $name, string $value)
  • string $name
  • string $value
html2text (line 3203)

Convert an HTML string into plain text.

This is used by msgHTML(). Note - older versions of this function used a bundled advanced converter which was been removed for license reasons in #232 Example usage:

    // Use default conversion $plain = $mail->html2text($html); // Use your own custom converter $plain = $mail->html2text($html, function($html) {     $converter = new MyHtml2text($html);     return $converter->get_text(); });

string html2text (string $html, [boolean|callable $advanced = false])
  • string $html: The HTML text to convert
  • boolean|callable $advanced: Any boolean value to use the internal converter, or provide your own callable for custom conversion.
inlineImageExists (line 2854)

Check if an inline attachment is present.

  • access: public
boolean inlineImageExists ()
isError (line 3055)

Check if an error occurred.

  • return: True if an error did occur.
  • access: public
boolean isError ()
isHTML (line 716)

Sets message type to HTML or plain.

void isHTML ([boolean $isHtml = true])
  • boolean $isHtml: True for HTML mode.
isMail (line 738)

Send messages using PHP's mail() function.

void isMail ()
isQmail (line 763)

Send messages using qmail.

void isQmail ()
isSendmail (line 747)

Send messages using $Sendmail.

void isSendmail ()
isSMTP (line 729)

Send messages using SMTP.

void isSMTP ()
lang (line 3030)

Get an error message in the current language.

  • access: protected
string lang (string $key)
  • string $key
mailSend (line 1257)

Send mail using the PHP mail() function.

boolean mailSend (string $header, string $body)
  • string $header: The message headers
  • string $body: The message body
msgHTML (line 3119)

Create a message from an HTML string.

Automatically makes modifications for inline images and backgrounds and creates a plain-text version by converting the HTML. Overwrites any existing values in $this->Body and $this->AltBody

  • return: $message
  • access: public
string msgHTML (string $message, [string $basedir = ''], [boolean|callable $advanced = false])
  • string $message: HTML message string
  • string $basedir: baseline directory for path
  • boolean|callable $advanced: Whether to use the internal HTML to text converter or your own custom converter @see html2text()
parseAddresses (line 876)

Parse and validate a string containing one or more RFC822-style comma-separated email addresses of the form "display name <address>" into an array of name/address pairs.

Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. Note that quotes in the name part are removed.

array parseAddresses (string $addrstr, [bool $useimap = true])
  • string $addrstr: The address list string
  • bool $useimap: Whether to use the IMAP extension to parse the list
postSend (line 1157)

Actually send a message.

Send the email via the selected mechanism

  • throws: phpmailerException
boolean postSend ()
preSend (line 1086)

Prepare a message for sending.

  • throws: phpmailerException
boolean preSend ()
secureHeader (line 3426)

Strip newlines to prevent header injection.

  • access: public
string secureHeader (string $str)
  • string $str
send (line 1064)

Create a message and send it.

Uses the sending method specified by $Mailer.

  • return: false on error - See the ErrorInfo property for details of the error.
  • throws: phpmailerException
boolean send ()
sendmailSend (line 1196)

Send mail using the $Sendmail program.

  • see: PHPMailer::$Sendmail @
  • throws: phpmailerException
  • access: protected
boolean sendmailSend (string $header, string $body)
  • string $header: The message headers
  • string $body: The message body
serverHostname (line 3009)

Get the server hostname.

Returns 'localhost.localdomain' if unknown.

  • access: protected
string serverHostname ()
set (line 3409)

Set or reset instance properties.

You should avoid this function - it's more verbose, less efficient, more error-prone and harder to debug than setting properties directly. Usage Example: `$mail->set('SMTPSecure', 'tls');` is the same as: `$mail->SMTPSecure = 'tls';`

  • TODO: Should this not be using the __set() magic function?
  • access: public
boolean set (string $name, [mixed $value = ''])
  • string $name: The property name to set
  • mixed $value: The value to set the property to
setError (line 2968)

Add an error message to the error container.

  • access: protected
void setError (string $msg)
  • string $msg
setFrom (line 929)

Set the From and FromName properties.

  • throws: phpmailerException
boolean setFrom (string $address, [string $name = ''], [boolean $auto = true])
  • string $address
  • string $name
  • boolean $auto: Whether to also set the Sender address, defaults to true
setLanguage (line 1512)

Set the language for error messages.

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

  • access: public
boolean setLanguage ([string $langcode = 'en'], [string $lang_path = ''])
  • string $langcode: ISO 639-1 2-character language code (e.g. French is "fr")
  • string $lang_path: Path to the language file directory, with trailing separator (slash)
setMessageType (line 2198)

Set the message type.

PHPMailer only supports some preset message types, not arbitrary MIME structures.

  • access: protected
void setMessageType ()
setWordWrap (line 1758)

Apply word wrapping to the message body.

Wraps the message body to the number of chars set in the WordWrap property. You should only do this to plain-text bodies as wrapping HTML tags may break them. This is called automatically by createBody(), so you don't need to call it yourself.

  • access: public
void setWordWrap ()
sign (line 3455)

Set the public and private key files and password for S/MIME signing.

  • access: public
void sign (string $cert_filename, string $key_filename, string $key_pass, [string $extracerts_filename = ''])
  • string $cert_filename
  • string $key_filename
  • string $key_pass: Password for private key
  • string $extracerts_filename: Optional path to chain certificate
smtpClose (line 1493)

Close the active SMTP session if one exists.

void smtpClose ()
smtpConnect (line 1381)

Initiate a connection to an SMTP server.

Returns false if the operation failed.

  • throws: phpmailerException
  • access: public
  • uses: SMTP - @
boolean smtpConnect ([array $options = array()])
  • array $options: An array of options compatible with stream_context_create()

Redefined in descendants as:
smtpSend (line 1318)

Send mail via SMTP.

Returns false if there is a bad MAIL FROM, RCPT, or DATA input. Uses the PHPMailerSMTP class by default.

  • see: PHPMailer::getSMTPInstance() to use a different class. @
  • throws: phpmailerException
  • access: protected
  • uses: SMTP - @
boolean smtpSend (string $header, string $body)
  • string $header: The message headers
  • string $body: The message body
textLine (line 2234)

Return a formatted mail line.

  • access: public
string textLine (string $value)
  • string $value
utf8CharBoundary (line 1713)

Find the last character boundary prior to $maxLength in a utf-8 quoted-printable encoded string.

Original written by Colin Brown.

  • access: public
integer utf8CharBoundary (string $encodedText, integer $maxLength)
  • string $encodedText: utf-8 QP text
  • integer $maxLength: Find the last character boundary prior to this length
wrapText (line 1614)

Word-wrap message.

For use with mailers that do not automatically perform wrapping and for quoted-printable encoded messages. 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

Documentation generated on Thu, 17 Sep 2015 12:06:43 +0200 by phpDocumentor 1.4.4