include/SugarPHPMailer.php

Show: inherited
Table of Contents

\SugarPHPMailer

Package: SugarCRM

Sugar mailer

Parent(s)
\PHPMailer
Api
 

Constants

Constant  STOP_MESSAGE = 0
inheritedInherited from: \PHPMailer::STOP_MESSAGE
Inherited_from
\PHPMailer::STOP_MESSAGE  
Constant  STOP_CONTINUE = 1
inheritedInherited from: \PHPMailer::STOP_CONTINUE
Inherited_from
\PHPMailer::STOP_CONTINUE  
Constant  STOP_CRITICAL = 2
inheritedInherited from: \PHPMailer::STOP_CRITICAL
Inherited_from
\PHPMailer::STOP_CRITICAL  

Properties

Propertypublicstring  $AltBody= ''''
inherited

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.

Inherited from: \PHPMailer::$$AltBody
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$AltBody  
Propertypublicstring  $Body= ''''
inherited

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

Inherited from: \PHPMailer::$$Body

If HTML then run IsHTML(true).

Default value''Details
Type
string
Inherited_from
\PHPMailer::$$Body  
Propertypublicstring  $CharSet= ''utf-8''
inherited

Sets the CharSet of the message.

Inherited from: \PHPMailer::$$CharSet
Default value'utf-8'Details
Type
string
Inherited_from
\PHPMailer::$$CharSet  
Propertypublicstring  $ConfirmReadingTo= ''''
inherited

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

Inherited from: \PHPMailer::$$ConfirmReadingTo
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$ConfirmReadingTo  
Propertypublicstring  $ContentType= ''text/plain''
inherited

Sets the Content-type of the message.

Inherited from: \PHPMailer::$$ContentType
Default value'text/plain'Details
Type
string
Inherited_from
\PHPMailer::$$ContentType  
Propertyprotected  $CustomHeader= 'array()'
inheritedInherited from: \PHPMailer::$$CustomHeader
Default valuearray()Details
Type
n/a
Inherited_from
\PHPMailer::$$CustomHeader  
Propertypublicstring  $DKIM_domain= ''''
inherited

Used with DKIM DNS Resource Record optional, in format of email address 'you@yourdomain.com'

Inherited from: \PHPMailer::$$DKIM_domain
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$DKIM_domain  
Propertypublicstring  $DKIM_identity= ''''
inherited

Used with DKIM DNS Resource Record optional, in format of email address 'you@yourdomain.com'

Inherited from: \PHPMailer::$$DKIM_identity
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$DKIM_identity  
Propertypublicstring  $DKIM_passphrase= ''''
inherited

Used with DKIM DNS Resource Record

Inherited from: \PHPMailer::$$DKIM_passphrase
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$DKIM_passphrase  
Propertypublicstring  $DKIM_private= ''''
inherited

Used with DKIM DNS Resource Record optional, in format of email address 'you@yourdomain.com'

Inherited from: \PHPMailer::$$DKIM_private
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$DKIM_private  
Propertypublicstring  $DKIM_selector= ''phpmailer''
inherited

Used with DKIM DNS Resource Record

Inherited from: \PHPMailer::$$DKIM_selector
Default value'phpmailer'Details
Type
string
Inherited_from
\PHPMailer::$$DKIM_selector  
Propertypublicstring  $Encoding= ''8bit''
inherited

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

Inherited from: \PHPMailer::$$Encoding
Default value'8bit'Details
Type
string
Inherited_from
\PHPMailer::$$Encoding  
Propertypublicstring  $ErrorInfo= ''''
inherited

Holds the most recent mailer error message.

Inherited from: \PHPMailer::$$ErrorInfo
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$ErrorInfo  
Propertypublicstring  $From= ''root@localhost''
inherited

Sets the From email address for the message.

Inherited from: \PHPMailer::$$From
Default value'root@localhost'Details
Type
string
Inherited_from
\PHPMailer::$$From  
Propertypublicstring  $FromName= ''Root User''
inherited

Sets the From name of the message.

Inherited from: \PHPMailer::$$FromName
Default value'Root User'Details
Type
string
Inherited_from
\PHPMailer::$$FromName  
Propertypublicstring  $Helo= ''''
inherited

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

Inherited from: \PHPMailer::$$Helo
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$Helo  
Propertypublicstring  $Host= ''localhost''
inherited

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

Inherited from: \PHPMailer::$$Host

Hosts will be tried in order.

Default value'localhost'Details
Type
string
Inherited_from
\PHPMailer::$$Host  
Propertypublicstring  $Hostname= ''''
inherited

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

Inherited from: \PHPMailer::$$Hostname
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$Hostname  
Propertypublicstring  $LE= '"\n"'
inherited

Provides the ability to change the line ending

Inherited from: \PHPMailer::$$LE
Default value"\n"Details
Type
string
Inherited_from
\PHPMailer::$$LE  
Propertyprotectedstring  $MIMEBody= ''''
inherited

Stores the complete compiled MIME message body.

Inherited from: \PHPMailer::$$MIMEBody
Default value''Details
Type
string
Access
protected  
Inherited_from
\PHPMailer::$$MIMEBody  
Propertyprotectedstring  $MIMEHeader= ''''
inherited

Stores the complete compiled MIME message headers.

Inherited from: \PHPMailer::$$MIMEHeader
Default value''Details
Type
string
Access
protected  
Inherited_from
\PHPMailer::$$MIMEHeader  
Propertypublicstring  $Mailer= ''mail''
inherited

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

Inherited from: \PHPMailer::$$Mailer
Default value'mail'Details
Type
string
Inherited_from
\PHPMailer::$$Mailer  
Propertypublicstring  $MessageID= ''''
inherited

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

Inherited from: \PHPMailer::$$MessageID

If empty, a unique id will be generated.

Default value''Details
Type
string
Inherited_from
\PHPMailer::$$MessageID  
Propertypublicstring  $Password= ''''
inherited

Sets SMTP password.

Inherited from: \PHPMailer::$$Password
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$Password  
Propertypublicstring  $PluginDir= ''''
inherited

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

Inherited from: \PHPMailer::$$PluginDir
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$PluginDir  
Propertypublicint  $Port= '25'
inherited

Sets the default SMTP server port.

Inherited from: \PHPMailer::$$Port
Default value25Details
Type
int
Inherited_from
\PHPMailer::$$Port  
Propertypublicint  $Priority= '3'
inherited

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

Inherited from: \PHPMailer::$$Priority
Default value3Details
Type
int
Inherited_from
\PHPMailer::$$Priority  
Propertyprotected  $ReplyTo= 'array()'
inheritedInherited from: \PHPMailer::$$ReplyTo
Default valuearray()Details
Type
n/a
Inherited_from
\PHPMailer::$$ReplyTo  
Propertypublicbool  $SMTPAuth= 'false'
inherited

Sets SMTP authentication. Utilizes the Username and Password variables.

Inherited from: \PHPMailer::$$SMTPAuth
Default valuefalseDetails
Type
bool
Inherited_from
\PHPMailer::$$SMTPAuth  
Propertypublicbool  $SMTPDebug= 'false'
inherited

Sets SMTP class debugging on or off.

Inherited from: \PHPMailer::$$SMTPDebug
Default valuefalseDetails
Type
bool
Inherited_from
\PHPMailer::$$SMTPDebug  
Propertypublicbool  $SMTPKeepAlive= 'false'
inherited

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

Inherited from: \PHPMailer::$$SMTPKeepAlive
Default valuefalseDetails
Type
bool
Inherited_from
\PHPMailer::$$SMTPKeepAlive  
Propertypublicstring  $SMTPSecure= ''''
inherited

Sets connection prefix.

Inherited from: \PHPMailer::$$SMTPSecure

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

Default value''Details
Type
string
Inherited_from
\PHPMailer::$$SMTPSecure  
Propertypublicstring  $Sender= ''''
inherited

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.

Inherited from: \PHPMailer::$$Sender
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$Sender  
Propertypublicstring  $Sendmail= ''/usr/sbin/sendmail''
inherited

Sets the path of the sendmail program.

Inherited from: \PHPMailer::$$Sendmail
Default value'/usr/sbin/sendmail'Details
Type
string
Inherited_from
\PHPMailer::$$Sendmail  
Propertyprotectedstring  $SentMIMEMessage= ''''
inherited

Stores the complete sent MIME message (Body and Headers)

Inherited from: \PHPMailer::$$SentMIMEMessage
Default value''Details
Type
string
Access
protected  
Inherited_from
\PHPMailer::$$SentMIMEMessage  
Propertypublicbool  $SingleTo= 'false'
inherited

Provides the ability to have the TO field process individual emails, instead of sending to entire TO addresses

Inherited from: \PHPMailer::$$SingleTo
Default valuefalseDetails
Type
bool
Inherited_from
\PHPMailer::$$SingleTo  
Propertypublicbool  $SingleToArray= 'array()'
inherited

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

Inherited from: \PHPMailer::$$SingleToArray
Default valuearray()Details
Type
bool
Inherited_from
\PHPMailer::$$SingleToArray  
Propertypublicstring  $Subject= ''''
inherited

Sets the Subject of the message.

Inherited from: \PHPMailer::$$Subject
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$Subject  
Propertypublicint  $Timeout= '10'
inherited

Sets the SMTP server timeout in seconds.

Inherited from: \PHPMailer::$$Timeout

This function will not work with the win32 version.

Default value10Details
Type
int
Inherited_from
\PHPMailer::$$Timeout  
Propertypublicstring  $Username= ''''
inherited

Sets SMTP username.

Inherited from: \PHPMailer::$$Username
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$Username  
Propertypublicstring  $Version= ''5.2.1''
inherited

Sets the PHPMailer Version number

Inherited from: \PHPMailer::$$Version
Default value'5.2.1'Details
Type
string
Inherited_from
\PHPMailer::$$Version  
Propertypublicint  $WordWrap= '0'
inherited

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

Inherited from: \PHPMailer::$$WordWrap
Default value0Details
Type
int
Inherited_from
\PHPMailer::$$WordWrap  
Propertypublicstring  $XMailer= ''''
inherited

What to use in the X-Mailer header

Inherited from: \PHPMailer::$$XMailer
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$XMailer  
Propertypublicstring  $action_function= ''''
inherited

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

Inherited from: \PHPMailer::$$action_function
Default value''Details
Type
string
Inherited_from
\PHPMailer::$$action_function  
Propertyprotected  $all_recipients= 'array()'
inheritedInherited from: \PHPMailer::$$all_recipients
Default valuearray()Details
Type
n/a
Inherited_from
\PHPMailer::$$all_recipients  
Propertyprotected  $attachment= 'array()'
inheritedInherited from: \PHPMailer::$$attachment
Default valuearray()Details
Type
n/a
Inherited_from
\PHPMailer::$$attachment  
Propertyprotected  $bcc= 'array()'
inheritedInherited from: \PHPMailer::$$bcc
Default valuearray()Details
Type
n/a
Inherited_from
\PHPMailer::$$bcc  
Propertyprotected  $boundary= 'array()'
inheritedInherited from: \PHPMailer::$$boundary
Default valuearray()Details
Type
n/a
Inherited_from
\PHPMailer::$$boundary  
Propertyprotected  $cc= 'array()'
inheritedInherited from: \PHPMailer::$$cc
Default valuearray()Details
Type
n/a
Inherited_from
\PHPMailer::$$cc  
Propertypublic  $disclosureEnabled= ''
Details
Type
n/a
Propertypublic  $disclosureText= ''
Details
Type
n/a
Propertyprotected  $error_count= '0'
inheritedInherited from: \PHPMailer::$$error_count
Default value0Details
Type
n/a
Inherited_from
\PHPMailer::$$error_count  
Propertyprotected  $exceptions= 'false'
inheritedInherited from: \PHPMailer::$$exceptions
Default valuefalseDetails
Type
n/a
Inherited_from
\PHPMailer::$$exceptions  
Propertypublic  $isHostEmpty= 'false'
Default valuefalseDetails
Type
n/a
Propertyprotected  $language= 'array()'
inheritedInherited from: \PHPMailer::$$language
Default valuearray()Details
Type
n/a
Inherited_from
\PHPMailer::$$language  
Propertyprotected  $message_type= ''''
inheritedInherited from: \PHPMailer::$$message_type
Default value''Details
Type
n/a
Inherited_from
\PHPMailer::$$message_type  
Propertypublic  $oe= ''
Details
Type
n/a
Propertypublic  $opensslOpened= 'true'
Default valuetrueDetails
Type
n/a
Propertypublic  $preppedForOutbound= 'false'
Default valuefalseDetails
Type
n/a
Propertypublic  $protocol= '"tcp://"'
Default value"tcp://"Details
Type
n/a
Propertyprotected  $sign_cert_file= ''''
inheritedInherited from: \PHPMailer::$$sign_cert_file
Default value''Details
Type
n/a
Inherited_from
\PHPMailer::$$sign_cert_file  
Propertyprotected  $sign_key_file= ''''
inheritedInherited from: \PHPMailer::$$sign_key_file
Default value''Details
Type
n/a
Inherited_from
\PHPMailer::$$sign_key_file  
Propertyprotected  $sign_key_pass= ''''
inheritedInherited from: \PHPMailer::$$sign_key_pass
Default value''Details
Type
n/a
Inherited_from
\PHPMailer::$$sign_key_pass  
Propertyprotected  $smtp= 'NULL'
inheritedInherited from: \PHPMailer::$$smtp
Default valueNULLDetails
Type
n/a
Inherited_from
\PHPMailer::$$smtp  
Propertyprotected  $to= 'array()'
inheritedInherited from: \PHPMailer::$$to
Default valuearray()Details
Type
n/a
Inherited_from
\PHPMailer::$$to  

Methods

methodpublicAddAddress( string $address, string $name = '' ) : boolean
inherited

Adds a "To" address.

Inherited from: \PHPMailer::AddAddress()
Parameters
Name Type Description
$address string
$name string
Returns
Type Description
boolean true on success, false if address already used
methodprotectedAddAnAddress( string $kind, string $address, string $name = '' ) : boolean
inherited

Adds an address to one of the recipient arrays Addresses that have been added already return false, but do not throw exceptions

Inherited from: \PHPMailer::AddAnAddress()
Parameters
Name Type Description
$kind string

One of 'to', 'cc', 'bcc', 'ReplyTo'

$address string

The email address to send to

$name string
Returns
Type Description
boolean true on success, false if address already used or invalid in some way
Details
Access
protected  
methodpublicAddAttachment( string $path, string $name = '', string $encoding = 'base64', string $type = 'application/octet-stream' ) : bool
inherited

Adds an attachment from a path on the filesystem.

Inherited from: \PHPMailer::AddAttachment()

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

Parameters
Name Type Description
$path string

Path to the attachment.

$name string

Overrides the attachment name.

$encoding string

File encoding (see $Encoding).

$type string

File extension (MIME) type.

Returns
Type Description
bool
methodpublicAddBCC( string $address, string $name = '' ) : boolean
inherited

Adds a "Bcc" address.

Inherited from: \PHPMailer::AddBCC()

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

Parameters
Name Type Description
$address string
$name string
Returns
Type Description
boolean true on success, false if address already used
methodpublicAddCC( string $address, string $name = '' ) : boolean
inherited

Adds a "Cc" address.

Inherited from: \PHPMailer::AddCC()

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

Parameters
Name Type Description
$address string
$name string
Returns
Type Description
boolean true on success, false if address already used
methodpublicAddCustomHeader(  $custom_header ) : void
inherited

Adds a custom header.

Inherited from: \PHPMailer::AddCustomHeader()
Parameters
Name Type Description
$custom_header
Details
Access
public  
methodpublicAddEmbeddedImage( string $path, string $cid, string $name = '', string $encoding = 'base64', string $type = 'application/octet-stream' ) : bool
inherited

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

Inherited from: \PHPMailer::AddEmbeddedImage()
Parameters
Name Type Description
$path string

Path to the attachment.

$cid string

Content ID of the attachment. Use this to identify the Id for accessing the image in an HTML form.

$name string

Overrides the attachment name.

$encoding string

File encoding (see $Encoding).

$type string

File extension (MIME) type.

Returns
Type Description
bool
methodpublicAddReplyTo( string $address, string $name = '' ) : boolean
inherited

Adds a "Reply-to" address.

Inherited from: \PHPMailer::AddReplyTo()
Parameters
Name Type Description
$address string
$name string
Returns
Type Description
boolean
methodpublicAddStringAttachment( string $string, string $filename, string $encoding = 'base64', string $type = 'application/octet-stream' ) : void
inherited

Adds a string or binary attachment (non-filesystem) to the list.

Inherited from: \PHPMailer::AddStringAttachment()

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

Parameters
Name Type Description
$string string

String attachment data.

$filename string

Name of the attachment.

$encoding string

File encoding (see $Encoding).

$type string

File extension (MIME) type.

methodpublicAddStringEmbeddedImage(  $string,  $cid,  $filename = '',  $encoding = 'base64',  $type = 'application/octet-stream' ) : void
inherited

Inherited from: \PHPMailer::AddStringEmbeddedImage()
Parameters
Name Type Description
$string
$cid
$filename
$encoding
$type
methodpublicAddrAppend(  $type,  $addr ) : string
inherited

Creates recipient headers.

Inherited from: \PHPMailer::AddrAppend()
Parameters
Name Type Description
$type
$addr
Returns
Type Description
string
Details
Access
public  
methodpublicAddrFormat(  $addr ) : string
inherited

Formats an address correctly.

Inherited from: \PHPMailer::AddrFormat()
Parameters
Name Type Description
$addr
Returns
Type Description
string
Details
Access
public  
methodpublicAlternativeExists( ) : void
inherited

Inherited from: \PHPMailer::AlternativeExists()
methodpublicAttachAll( ) : string

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

Returns an empty string on failure.

Returns
Type Description
string
Details
Access
private  
methodpublicAttachmentExists( ) : void
inherited

Inherited from: \PHPMailer::AttachmentExists()
methodpublicBase64EncodeWrapMB( string $str ) : string
inherited

Correctly encodes and wraps long multibyte strings for mail headers without breaking lines within a character.

Inherited from: \PHPMailer::Base64EncodeWrapMB()

Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php

Parameters
Name Type Description
$str string

multi-byte text to wrap encode

Returns
Type Description
string
Details
Access
public  
methodpublicClearAddresses( ) : void
inherited

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

Inherited from: \PHPMailer::ClearAddresses()
methodpublicClearAllRecipients( ) : void
inherited

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

Inherited from: \PHPMailer::ClearAllRecipients()
methodpublicClearAttachments( ) : void
inherited

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

Inherited from: \PHPMailer::ClearAttachments()
methodpublicClearBCCs( ) : void
inherited

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

Inherited from: \PHPMailer::ClearBCCs()
methodpublicClearCCs( ) : void
inherited

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

Inherited from: \PHPMailer::ClearCCs()
methodpublicClearCustomHeaders( ) : void
inherited

Clears all custom headers. Returns void.

Inherited from: \PHPMailer::ClearCustomHeaders()
methodpublicClearReplyTos( ) : void
inherited

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

Inherited from: \PHPMailer::ClearReplyTos()
methodpublicCreateBody( ) : string
inherited

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

Inherited from: \PHPMailer::CreateBody()
Returns
Type Description
string The assembled message body
Details
Access
public  
methodpublicCreateHeader( ) : string
inherited

Assembles message header.

Inherited from: \PHPMailer::CreateHeader()
Returns
Type Description
string The assembled header
Details
Access
public  
methodpublicDKIM_Add( string $headers_line, string $subject, string $body ) : void
inherited

Create the DKIM header, body, as new header

Inherited from: \PHPMailer::DKIM_Add()
Parameters
Name Type Description
$headers_line string

Header lines

$subject string

Subject

$body string

Body

Details
Access
public  
methodpublicDKIM_BodyC( string $body ) : void
inherited

Generate DKIM Canonicalization Body

Inherited from: \PHPMailer::DKIM_BodyC()
Parameters
Name Type Description
$body string

Message Body

Details
Access
public  
methodpublicDKIM_HeaderC( string $s ) : void
inherited

Generate DKIM Canonicalization Header

Inherited from: \PHPMailer::DKIM_HeaderC()
Parameters
Name Type Description
$s string

Header

Details
Access
public  
methodpublicDKIM_QP(  $txt ) : void
inherited

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

Inherited from: \PHPMailer::DKIM_QP()
Parameters
Name Type Description
$txt
Details
Access
public  
methodpublicDKIM_Sign( string $s ) : void
inherited

Generate DKIM signature

Inherited from: \PHPMailer::DKIM_Sign()
Parameters
Name Type Description
$s string

Header

Details
Access
public  
methodprotectedEncodeFile( string $path, string $encoding = 'base64' ) : string
inherited

Encodes attachment in requested format.

Inherited from: \PHPMailer::EncodeFile()

Returns an empty string on failure.

Parameters
Name Type Description
$path string

The full path to the file

$encoding string

The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'

Returns
Type Description
string
Details
Access
protected  
See
\EncodeFile()  
methodpublicEncodeHeader(  $str,  $position = 'text' ) : string
inherited

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

Inherited from: \PHPMailer::EncodeHeader()
Parameters
Name Type Description
$str
$position
Returns
Type Description
string
Details
Access
public  
methodpublicEncodeQ( string $str, string $position = 'text' ) : string
inherited

Encode string to q encoding.

Inherited from: \PHPMailer::EncodeQ()
Parameters
Name Type Description
$str string

the text to encode

$position string

Where the text is going to be used, see the RFC for what that means

Returns
Type Description
string
Details
Access
public  
Link
http://tools.ietf.org/html/rfc2047  
methodpublicEncodeQP( string $string, integer $line_max = 76, boolean $space_conv = false ) : string
inherited

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

Inherited from: \PHPMailer::EncodeQP()
Parameters
Name Type Description
$string string

the text to encode

$line_max integer

Number of chars allowed on a line before wrapping

$space_conv boolean

Dummy param for compatibility with existing EncodeQP function

Returns
Type Description
string
Details
Access
public  
Author
Marcus Bointon  
See
\EncodeQPphp()  
methodpublicEncodeQPphp(  $input = '', integer $line_max = 76,  $space_conv = false ) : string
inherited

Encode string to quoted-printable.

Inherited from: \PHPMailer::EncodeQPphp()

Only uses standard PHP, slow, but will always work

Parameters
Name Type Description
$input
$line_max integer

Number of chars allowed on a line before wrapping

$space_conv
Returns
Type Description
string
Details
Access
public  
methodpublicEncodeString( string $str, string $encoding = 'base64' ) : string
inherited

Encodes string to requested format.

Inherited from: \PHPMailer::EncodeString()

Returns an empty string on failure.

Parameters
Name Type Description
$str string

The text to encode

$encoding string

The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'

Returns
Type Description
string
Details
Access
public  
methodprotectedEndBoundary(  $boundary ) : string
inherited

Returns the end of a message boundary.

Inherited from: \PHPMailer::EndBoundary()
Parameters
Name Type Description
$boundary
Returns
Type Description
string
Details
Access
protected  
methodpublicFixEOL(  $str ) : string
inherited

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

Inherited from: \PHPMailer::FixEOL()
Parameters
Name Type Description
$str
Returns
Type Description
string
Details
Access
public  
methodpublicGetAttachments( ) : array
inherited

Return the current array of attachments

Inherited from: \PHPMailer::GetAttachments()
Returns
Type Description
array
methodprotectedGetBoundary(  $boundary,  $charSet,  $contentType,  $encoding ) : string
inherited

Returns the start of a message boundary.

Inherited from: \PHPMailer::GetBoundary()
Parameters
Name Type Description
$boundary
$charSet
$contentType
$encoding
Returns
Type Description
string
Details
Access
protected  
methodpublicGetMailMIME( ) : string
inherited

Returns the message MIME.

Inherited from: \PHPMailer::GetMailMIME()
Returns
Type Description
string
Details
Access
public  
methodpublicGetSentMIMEMessage( ) : string
inherited

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

Inherited from: \PHPMailer::GetSentMIMEMessage()
Returns
Type Description
string
Details
Access
public  
methodpublicGetTranslations( ) : array
inherited

Return the current array of language strings

Inherited from: \PHPMailer::GetTranslations()
Returns
Type Description
array
methodpublicHasMultiBytes( string $str ) : bool
inherited

Checks if a string contains multibyte characters.

Inherited from: \PHPMailer::HasMultiBytes()
Parameters
Name Type Description
$str string

multi-byte text to wrap encode

Returns
Type Description
bool
Details
Access
public  
methodpublicHeaderLine(  $name,  $value ) : string
inherited

Returns a formatted header line.

Inherited from: \PHPMailer::HeaderLine()
Parameters
Name Type Description
$name
$value
Returns
Type Description
string
Details
Access
public  
methodpublicInlineImageExists( ) : bool
inherited

Returns true if an inline attachment is present.

Inherited from: \PHPMailer::InlineImageExists()
Returns
Type Description
bool
Details
Access
public  
methodpublicIsError( ) : bool
inherited

Returns true if an error occurred.

Inherited from: \PHPMailer::IsError()
Returns
Type Description
bool
Details
Access
public  
methodpublicIsHTML( bool $ishtml = true ) : void
inherited

Sets message type to HTML.

Inherited from: \PHPMailer::IsHTML()
Parameters
Name Type Description
$ishtml bool
methodpublicIsMail( ) : void
inherited

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

Inherited from: \PHPMailer::IsMail()
methodpublicIsQmail( ) : void
inherited

Sets Mailer to send message using the qmail MTA.

Inherited from: \PHPMailer::IsQmail()
methodpublicIsSMTP( ) : void
inherited

Sets Mailer to send message using SMTP.

Inherited from: \PHPMailer::IsSMTP()
methodpublicIsSendmail( ) : void
inherited

Sets Mailer to send message using the $Sendmail program.

Inherited from: \PHPMailer::IsSendmail()
methodprotectedLang(  $key ) : string
inherited

Returns a message in the appropriate language.

Inherited from: \PHPMailer::Lang()
Parameters
Name Type Description
$key
Returns
Type Description
string
Details
Access
protected  
methodprotectedMailSend( string $header, string $body ) : bool
inherited

Sends mail using the PHP mail() function.

Inherited from: \PHPMailer::MailSend()
Parameters
Name Type Description
$header string

The message headers

$body string

The message body

Returns
Type Description
bool
Details
Access
protected  
methodpublicMsgHTML(  $message,  $basedir = '' ) : \$message
inherited

Evaluates the message and returns modifications for inline images and backgrounds

Inherited from: \PHPMailer::MsgHTML()
Parameters
Name Type Description
$message
$basedir
Returns
Type Description
\$message
Details
Access
public  
methodprotectedPostSend( ) : void
inherited

Inherited from: \PHPMailer::PostSend()
methodprotectedPreSend( ) : void

methodpublicRFCDate( ) : string
staticinherited

Returns the proper RFC 822 formatted date.

Inherited from: \PHPMailer::RFCDate()
Returns
Type Description
string
Details
Access
public  
Static
 
methodpublicSecureHeader( string $str ) : string
inherited

Strips newlines to prevent header injection.

Inherited from: \PHPMailer::SecureHeader()
Parameters
Name Type Description
$str string

String

Returns
Type Description
string
Details
Access
public  
methodpublicSend( ) : bool
inherited

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.

Inherited from: \PHPMailer::Send()
Returns
Type Description
bool
methodprotectedSendmailSend( string $header, string $body ) : bool
inherited

Sends mail using the $Sendmail program.

Inherited from: \PHPMailer::SendmailSend()
Parameters
Name Type Description
$header string

The message headers

$body string

The message body

Returns
Type Description
bool
Details
Access
protected  
methodprotectedServerHostname( ) : string
inherited

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

Inherited from: \PHPMailer::ServerHostname()
Returns
Type Description
string
Details
Access
protected  
methodpublicSetError(  $msg ) : void

overloads class.phpmailer's SetError() method so that we can log errors in sugarcrm.log

Parameters
Name Type Description
$msg
methodpublicSetFrom( string $address, string $name = '',  $auto = 1 ) : boolean
inherited

Set the From and FromName properties

Inherited from: \PHPMailer::SetFrom()
Parameters
Name Type Description
$address string
$name string
$auto
Returns
Type Description
boolean
methodpublicSetLanguage( string $langcode = 'en', string $lang_path = 'language/' ) : void
inherited

Sets the language for all class error messages.

Inherited from: \PHPMailer::SetLanguage()

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

Parameters
Name Type Description
$langcode string

ISO 639-1 2-character language code (e.g. Portuguese: "br")

$lang_path string

Path to the language file directory

Details
Access
public  
methodprotectedSetMessageType( ) : void
inherited

Sets the message type.

Inherited from: \PHPMailer::SetMessageType()
Details
Access
protected  
methodpublicSetWordWrap( ) : void
inherited

Set the body wrapping.

Inherited from: \PHPMailer::SetWordWrap()
Details
Access
public  
methodpublicSign(  $cert_filename, string $key_filename, string $key_pass ) : void
inherited

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

Inherited from: \PHPMailer::Sign()
Parameters
Name Type Description
$cert_filename
$key_filename string

Parameter File Name

$key_pass string

Password for private key

Details
Access
public  
methodpublicSmtpClose( ) : void
inherited

Closes the active SMTP session if one exists.

Inherited from: \PHPMailer::SmtpClose()
methodpublicSmtpConnect( ) : bool

Initiates a connection to an SMTP server.

Returns false if the operation failed.

Returns
Type Description
bool
methodprotectedSmtpSend( string $header, string $body ) : bool
inherited

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

Inherited from: \PHPMailer::SmtpSend()
Parameters
Name Type Description
$header string

The message headers

$body string

The message body

Returns
Type Description
bool
Details
Access
protected  
Uses
\SMTP  
methodpublicSugarPHPMailer( ) : void

Sole constructor

methodpublicTextLine(  $value ) : string
inherited

Returns a formatted mail line.

Inherited from: \PHPMailer::TextLine()
Parameters
Name Type Description
$value
Returns
Type Description
string
Details
Access
public  
methodpublicUTF8CharBoundary( string $encodedText, int $maxLength ) : int
inherited

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

Inherited from: \PHPMailer::UTF8CharBoundary()

Original written by Colin Brown.

Parameters
Name Type Description
$encodedText string

utf-8 QP text

$maxLength int

find last character boundary prior to this length

Returns
Type Description
int
Details
Access
public  
methodpublicValidateAddress( string $address ) : boolean
staticinherited

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

Inherited from: \PHPMailer::ValidateAddress()
Parameters
Name Type Description
$address string

The email address to check

Returns
Type Description
boolean
Details
Access
public  
Link
Original pattern found here  
Static
 
methodpublicWrapText( string $message, integer $length, boolean $qp_mode = false ) : string
inherited

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

Inherited from: \PHPMailer::WrapText()

Original written by philippe.

Parameters
Name Type Description
$message string

The message to wrap

$length integer

The line length to wrap to

$qp_mode boolean

Whether to run in Quoted-Printable mode

Returns
Type Description
string
Details
Access
public  
methodpublic__construct( boolean $exceptions = false ) : void
inherited

Constructor

Inherited from: \PHPMailer::__construct()
Parameters
Name Type Description
$exceptions boolean

Should we throw external exceptions?

methodpublic_mime_types( string $ext = '' ) : string
staticinherited

Gets the MIME type of the embedded or inline image

Inherited from: \PHPMailer::_mime_types()
Parameters
Name Type Description
$ext string

File extension

Returns
Type Description
string MIME type of ext
Details
Access
public  
Static
 
methodprotecteddoCallback(  $isSent,  $to,  $cc,  $bcc,  $subject,  $body ) : void
inherited

Inherited from: \PHPMailer::doCallback()
Parameters
Name Type Description
$isSent
$to
$cc
$bcc
$subject
$body
methodpublichandleAttachments( \notes $notes ) : void

Parameters
Name Type Description
$notes \notes

array of note beans

methodpublicprepForOutbound( ) : void

handles Charset translation for all visual parts of the email.

methodpublicreplaceImageByRegex( string $regex, string $local_prefix, bool $object = false ) : void

Replace images with locations specified by regex with cid: images and attach needed files

Parameters
Name Type Description
$regex string

Regular expression

$local_prefix string

Prefix where local files are stored

$object bool

Use attachment object

methodpublicset( string $name, mixed $value = '' ) : void
inherited

Set (or reset) Class Objects (variables)

Inherited from: \PHPMailer::set()

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

Parameters
Name Type Description
$name string

Parameter Name

$value mixed

Parameter Value NOTE: will not work with arrays, there are no arrays to set/reset

Details
Access
public  
methodpublicsetMailer( ) : void

Prefills outbound details

methodpublicsetMailerForSystem( ) : void

Prefills mailer for system

Documentation was generated by DocBlox 0.18.1.