XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
PHPMailer Class Reference
Inheritance diagram for PHPMailer:
Inheritance graph

Public Member Functions

 __construct ($exceptions=false)
 
 AddAddress ($address, $name= '')
 
 AddAttachment ($path, $name= '', $encoding= 'base64', $type= 'application/octet-stream')
 
 AddBCC ($address, $name= '')
 
 AddCC ($address, $name= '')
 
 AddCustomHeader ($custom_header)
 
 AddEmbeddedImage ($path, $cid, $name= '', $encoding= 'base64', $type= 'application/octet-stream')
 
 AddrAppend ($type, $addr)
 
 AddReplyTo ($address, $name= '')
 
 AddrFormat ($addr)
 
 AddStringAttachment ($string, $filename, $encoding= 'base64', $type= 'application/octet-stream')
 
 AddStringEmbeddedImage ($string, $cid, $filename= '', $encoding= 'base64', $type= 'application/octet-stream')
 
 AlternativeExists ()
 
 AttachmentExists ()
 
 Base64EncodeWrapMB ($str)
 
 ClearAddresses ()
 
 ClearAllRecipients ()
 
 ClearAttachments ()
 
 ClearBCCs ()
 
 ClearCCs ()
 
 ClearCustomHeaders ()
 
 ClearReplyTos ()
 
 CreateBody ()
 
 CreateHeader ()
 
 DKIM_Add ($headers_line, $subject, $body)
 
 DKIM_BodyC ($body)
 
 DKIM_HeaderC ($s)
 
 DKIM_QP ($txt)
 
 DKIM_Sign ($s)
 
 EncodeHeader ($str, $position= 'text')
 
 EncodeQ ($str, $position= 'text')
 
 EncodeQP ($string, $line_max=76, $space_conv=false)
 
 EncodeQPphp ($input= '', $line_max=76, $space_conv=false)
 
 EncodeString ($str, $encoding= 'base64')
 
 FixEOL ($str)
 
 GetAttachments ()
 
 GetMailMIME ()
 
 GetSentMIMEMessage ()
 
 GetTranslations ()
 
 HasMultiBytes ($str)
 
 HeaderLine ($name, $value)
 
 InlineImageExists ()
 
 IsError ()
 
 IsHTML ($ishtml=true)
 
 IsMail ()
 
 IsQmail ()
 
 IsSendmail ()
 
 IsSMTP ()
 
 MsgHTML ($message, $basedir= '')
 
 SecureHeader ($str)
 
 Send ()
 
 set ($name, $value= '')
 
 SetFrom ($address, $name= '', $auto=1)
 
 SetLanguage ($langcode= 'en', $lang_path= 'language/')
 
 SetWordWrap ()
 
 Sign ($cert_filename, $key_filename, $key_pass)
 
 SmtpClose ()
 
 SmtpConnect ()
 
 TextLine ($value)
 
 UTF8CharBoundary ($encodedText, $maxLength)
 
 WrapText ($message, $length, $qp_mode=false)
 

Static Public Member Functions

static _mime_types ($ext= '')
 
static RFCDate ()
 
static ValidateAddress ($address)
 

Public Attributes

 $action_function = ''
 
 $AltBody = ''
 
 $Body = ''
 
 $CharSet = 'iso-8859-1'
 
 $ConfirmReadingTo = ''
 
 $ContentType = 'text/plain'
 
 $DKIM_domain = ''
 
 $DKIM_identity = ''
 
 $DKIM_passphrase = ''
 
 $DKIM_private = ''
 
 $DKIM_selector = 'phpmailer'
 
 $Encoding = '8bit'
 
 $ErrorInfo = ''
 
 $From = 'root@localhost'
 
 $FromName = 'Root User'
 
 $Helo = ''
 
 $Host = 'localhost'
 
 $Hostname = ''
 
 $LE = "\n"
 
 $Mailer = 'mail'
 
 $MessageID = ''
 
 $Password = ''
 
 $PluginDir = ''
 
 $Port = 25
 
 $Priority = 3
 
 $Sender = ''
 
 $Sendmail = '/usr/sbin/sendmail'
 
 $SingleTo = false
 
 $SingleToArray = array()
 
 $SMTPAuth = false
 
 $SMTPDebug = false
 
 $SMTPKeepAlive = false
 
 $SMTPSecure = ''
 
 $Subject = ''
 
 $Timeout = 10
 
 $Username = ''
 
 $Version = '5.2.1'
 
 $WordWrap = 0
 
 $XMailer = ''
 
const STOP_CONTINUE = 1
 
const STOP_CRITICAL = 2
 
const STOP_MESSAGE = 0
 

Protected Member Functions

 AddAnAddress ($kind, $address, $name= '')
 
 AttachAll ($disposition_type, $boundary)
 
 doCallback ($isSent, $to, $cc, $bcc, $subject, $body)
 
 EncodeFile ($path, $encoding= 'base64')
 
 EndBoundary ($boundary)
 
 GetBoundary ($boundary, $charSet, $contentType, $encoding)
 
 Lang ($key)
 
 MailSend ($header, $body)
 
 PostSend ()
 
 PreSend ()
 
 SendmailSend ($header, $body)
 
 ServerHostname ()
 
 SetError ($msg)
 
 SetMessageType ()
 
 SmtpSend ($header, $body)
 

Protected Attributes

 $all_recipients = array()
 
 $attachment = array()
 
 $bcc = array()
 
 $boundary = array()
 
 $cc = array()
 
 $CustomHeader = array()
 
 $error_count = 0
 
 $exceptions = false
 
 $language = array()
 
 $message_type = ''
 
 $MIMEBody = ''
 
 $MIMEHeader = ''
 
 $ReplyTo = array()
 
 $SentMIMEMessage = ''
 
 $sign_cert_file = ''
 
 $sign_key_file = ''
 
 $sign_key_pass = ''
 
 $smtp = NULL
 
 $to = array()
 

Detailed Description

Definition at line 40 of file class.phpmailer.php.

Constructor & Destructor Documentation

PHPMailer::__construct (   $exceptions = false)

Constructor

Parameters
boolean$exceptionsShould we throw external exceptions?

Definition at line 372 of file class.phpmailer.php.

References $exceptions.

Member Function Documentation

static PHPMailer::_mime_types (   $ext = '')
static

Gets the MIME type of the embedded or inline image

Parameters
stringFile extension public
Returns
string MIME type of ext

Definition at line 2253 of file class.phpmailer.php.

References $ext.

PHPMailer::AddAddress (   $address,
  $name = '' 
)

Adds a "To" address.

Parameters
string$address
string$name
Returns
boolean true on success, false if address already used

Definition at line 437 of file class.phpmailer.php.

References AddAnAddress().

Here is the call graph for this function:

PHPMailer::AddAnAddress (   $kind,
  $address,
  $name = '' 
)
protected

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

Parameters
string$kindOne of 'to', 'cc', 'bcc', 'ReplyTo'
string$addressThe email address to send to
string$name
Returns
boolean true on success, false if address already used or invalid in some way protected

Definition at line 482 of file class.phpmailer.php.

References Lang(), and SetError().

Referenced by AddAddress(), AddBCC(), AddCC(), AddReplyTo(), and SetFrom().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::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.

Parameters
string$pathPath to the attachment.
string$nameOverrides the attachment name.
string$encodingFile encoding (see $Encoding).
string$typeFile extension (MIME) type.
Returns
bool

Definition at line 1510 of file class.phpmailer.php.

References $path, $type, Lang(), and SetError().

Here is the call graph for this function:

PHPMailer::AddBCC (   $address,
  $name = '' 
)

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

Parameters
string$address
string$name
Returns
boolean true on success, false if address already used

Definition at line 459 of file class.phpmailer.php.

References AddAnAddress().

Here is the call graph for this function:

PHPMailer::AddCC (   $address,
  $name = '' 
)

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

Parameters
string$address
string$name
Returns
boolean true on success, false if address already used

Definition at line 448 of file class.phpmailer.php.

References AddAnAddress().

Here is the call graph for this function:

PHPMailer::AddCustomHeader (   $custom_header)

Adds a custom header. public

Returns
void

Definition at line 2203 of file class.phpmailer.php.

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

Parameters
string$pathPath to the attachment.
string$cidContent ID of the attachment. Use this to identify the Id for accessing the image in an HTML form.
string$nameOverrides the attachment name.
string$encodingFile encoding (see $Encoding).
string$typeFile extension (MIME) type.
Returns
bool

Definition at line 1965 of file class.phpmailer.php.

References $path, $type, Lang(), and SetError().

Referenced by MsgHTML().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::AddrAppend (   $type,
  $addr 
)

Creates recipient headers. public

Returns
string

Definition at line 991 of file class.phpmailer.php.

References $LE, $type, and AddrFormat().

Referenced by CreateHeader(), and PreSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::AddReplyTo (   $address,
  $name = '' 
)

Adds a "Reply-to" address.

Parameters
string$address
string$name
Returns
boolean

Definition at line 469 of file class.phpmailer.php.

References AddAnAddress().

Here is the call graph for this function:

PHPMailer::AddrFormat (   $addr)

Formats an address correctly. public

Returns
string

Definition at line 1008 of file class.phpmailer.php.

References EncodeHeader(), and SecureHeader().

Referenced by AddrAppend(), CreateHeader(), and MailSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::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.

Parameters
string$stringString attachment data.
string$filenameName of the attachment.
string$encodingFile encoding (see $Encoding).
string$typeFile extension (MIME) type.
Returns
void

Definition at line 1938 of file class.phpmailer.php.

References $type.

PHPMailer::AddStringEmbeddedImage (   $string,
  $cid,
  $filename = '',
  $encoding = 'base64',
  $type = 'application/octet-stream' 
)

Definition at line 1992 of file class.phpmailer.php.

References $type.

PHPMailer::AlternativeExists ( )

Definition at line 2029 of file class.phpmailer.php.

Referenced by SetMessageType().

Here is the caller graph for this function:

PHPMailer::AttachAll (   $disposition_type,
  $boundary 
)
protected

Attaches all fs, string, and binary attachments to the message. Returns an empty string on failure. protected

Returns
string

Definition at line 1560 of file class.phpmailer.php.

References $attachment, $boundary, $path, $type, EncodeFile(), EncodeHeader(), EncodeString(), IsError(), and SecureHeader().

Referenced by CreateBody().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::AttachmentExists ( )

Definition at line 2020 of file class.phpmailer.php.

References $attachment.

Referenced by SetMessageType().

Here is the caller graph for this function:

PHPMailer::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

Parameters
string$strmulti-byte text to wrap encode
Returns
string

Definition at line 1781 of file class.phpmailer.php.

References $i, $LE, and $start.

Referenced by EncodeHeader().

Here is the caller graph for this function:

PHPMailer::ClearAddresses ( )

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

Returns
void

Definition at line 2041 of file class.phpmailer.php.

References $to.

PHPMailer::ClearAllRecipients ( )

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

Returns
void

Definition at line 2083 of file class.phpmailer.php.

PHPMailer::ClearAttachments ( )

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

Returns
void

Definition at line 2095 of file class.phpmailer.php.

PHPMailer::ClearBCCs ( )

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

Returns
void

Definition at line 2063 of file class.phpmailer.php.

References $bcc.

PHPMailer::ClearCCs ( )

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

Returns
void

Definition at line 2052 of file class.phpmailer.php.

References $cc.

PHPMailer::ClearCustomHeaders ( )

Clears all custom headers. Returns void.

Returns
void

Definition at line 2103 of file class.phpmailer.php.

PHPMailer::ClearReplyTos ( )

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

Returns
void

Definition at line 2074 of file class.phpmailer.php.

PHPMailer::CreateBody ( )

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

Returns
string The assembled message body

Definition at line 1304 of file class.phpmailer.php.

References $file, $LE, AttachAll(), EncodeString(), EndBoundary(), GetBoundary(), GetMailMIME(), HeaderLine(), IsError(), Lang(), SetWordWrap(), and TextLine().

Referenced by PreSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::CreateHeader ( )

Assembles message header. public

Returns
string The assembled header

Definition at line 1169 of file class.phpmailer.php.

References $FromName, $index, $result, AddrAppend(), AddrFormat(), EncodeHeader(), GetMailMIME(), HeaderLine(), SecureHeader(), and ServerHostname().

Referenced by PreSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::DKIM_Add (   $headers_line,
  $subject,
  $body 
)

Create the DKIM header, body, as new header

public

Parameters
string$headers_lineHeader lines
string$subjectSubject
string$bodyBody

Definition at line 2483 of file class.phpmailer.php.

References $to, DKIM_BodyC(), DKIM_HeaderC(), DKIM_QP(), and DKIM_Sign().

Referenced by PreSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::DKIM_BodyC (   $body)

Generate DKIM Canonicalization Body

public

Parameters
string$bodyMessage Body

Definition at line 2463 of file class.phpmailer.php.

Referenced by DKIM_Add().

Here is the caller graph for this function:

PHPMailer::DKIM_HeaderC (   $s)

Generate DKIM Canonicalization Header

public

Parameters
string$sHeader

Definition at line 2444 of file class.phpmailer.php.

Referenced by DKIM_Add().

Here is the caller graph for this function:

PHPMailer::DKIM_QP (   $txt)

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

public

Parameters
string$key_filenameParameter File Name
string$key_passPassword for private key

Definition at line 2406 of file class.phpmailer.php.

References $i.

Referenced by DKIM_Add().

Here is the caller graph for this function:

PHPMailer::DKIM_Sign (   $s)

Generate DKIM signature

public

Parameters
string$sHeader

Definition at line 2426 of file class.phpmailer.php.

Referenced by DKIM_Add().

Here is the caller graph for this function:

PHPMailer::doCallback (   $isSent,
  $to,
  $cc,
  $bcc,
  $subject,
  $body 
)
protected

Definition at line 2518 of file class.phpmailer.php.

References $bcc, $cc, and $to.

Referenced by MailSend(), SendmailSend(), and SmtpSend().

Here is the caller graph for this function:

PHPMailer::EncodeFile (   $path,
  $encoding = 'base64' 
)
protected

Encodes attachment in requested format. Returns an empty string on failure.

Parameters
string$pathThe full path to the file
string$encodingThe encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
See Also
EncodeFile() protected
Returns
string

Definition at line 1631 of file class.phpmailer.php.

References $path, EncodeString(), Lang(), and SetError().

Referenced by AttachAll().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::EncodeHeader (   $str,
  $position = 'text' 
)

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

Returns
string

Definition at line 1704 of file class.phpmailer.php.

References Base64EncodeWrapMB(), EncodeQ(), HasMultiBytes(), and WrapText().

Referenced by AddrFormat(), AttachAll(), CreateHeader(), MailSend(), and PreSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::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 1903 of file class.phpmailer.php.

Referenced by EncodeHeader().

Here is the caller graph for this function:

PHPMailer::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

See Also
EncodeQPphp() public
Parameters
string$stringthe text to encode
integer$line_maxNumber of chars allowed on a line before wrapping
boolean$space_convDummy param for compatibility with existing EncodeQP function
Returns
string
Author
Marcus Bointon

Definition at line 1874 of file class.phpmailer.php.

References EncodeQPphp().

Referenced by EncodeString().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::EncodeQPphp (   $input = '',
  $line_max = 76,
  $space_conv = false 
)

Encode string to quoted-printable. Only uses standard PHP, slow, but will always work public

Parameters
string$stringthe text to encode
integer$line_maxNumber of chars allowed on a line before wrapping
Returns
string

Definition at line 1821 of file class.phpmailer.php.

References $i.

Referenced by EncodeQP().

Here is the caller graph for this function:

PHPMailer::EncodeString (   $str,
  $encoding = 'base64' 
)

Encodes string to requested format. Returns an empty string on failure.

Parameters
string$strThe text to encode
string$encodingThe encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' public
Returns
string

Definition at line 1673 of file class.phpmailer.php.

References $LE, EncodeQP(), FixEOL(), Lang(), and SetError().

Referenced by AttachAll(), CreateBody(), and EncodeFile().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::EndBoundary (   $boundary)
protected

Returns the end of a message boundary. protected

Returns
string

Definition at line 1460 of file class.phpmailer.php.

References $boundary, and $LE.

Referenced by CreateBody().

Here is the caller graph for this function:

PHPMailer::FixEOL (   $str)

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

Returns
string

Definition at line 2191 of file class.phpmailer.php.

Referenced by EncodeString(), and WrapText().

Here is the caller graph for this function:

PHPMailer::GetAttachments ( )

Return the current array of attachments

Returns
array

Definition at line 1550 of file class.phpmailer.php.

References $attachment.

PHPMailer::GetBoundary (   $boundary,
  $charSet,
  $contentType,
  $encoding 
)
protected

Returns the start of a message boundary. protected

Returns
string

Definition at line 1435 of file class.phpmailer.php.

References $boundary, $CharSet, $ContentType, $Encoding, $LE, $result, HeaderLine(), and TextLine().

Referenced by CreateBody().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::GetMailMIME ( )

Returns the message MIME. public

Returns
string

Definition at line 1257 of file class.phpmailer.php.

References $result, HeaderLine(), and TextLine().

Referenced by CreateBody(), and CreateHeader().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::GetSentMIMEMessage ( )

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

Returns
string

Definition at line 1294 of file class.phpmailer.php.

References $SentMIMEMessage.

PHPMailer::GetTranslations ( )

Return the current array of language strings

Returns
array

Definition at line 978 of file class.phpmailer.php.

References $language.

PHPMailer::HasMultiBytes (   $str)

Checks if a string contains multibyte characters. public

Parameters
string$strmulti-byte text to wrap encode
Returns
bool

Definition at line 1765 of file class.phpmailer.php.

Referenced by EncodeHeader().

Here is the caller graph for this function:

PHPMailer::HeaderLine (   $name,
  $value 
)

Returns a formatted header line. public

Returns
string

Definition at line 1483 of file class.phpmailer.php.

References $LE.

Referenced by CreateBody(), CreateHeader(), GetBoundary(), GetMailMIME(), and PreSend().

Here is the caller graph for this function:

PHPMailer::InlineImageExists ( )

Returns true if an inline attachment is present. public

Returns
bool

Definition at line 2011 of file class.phpmailer.php.

References $attachment.

Referenced by SetMessageType().

Here is the caller graph for this function:

PHPMailer::IsError ( )

Returns true if an error occurred. public

Returns
bool

Definition at line 2182 of file class.phpmailer.php.

Referenced by AttachAll(), and CreateBody().

Here is the caller graph for this function:

PHPMailer::IsHTML (   $ishtml = true)

Sets message type to HTML.

Parameters
bool$ishtml
Returns
void

Definition at line 381 of file class.phpmailer.php.

Referenced by MsgHTML().

Here is the caller graph for this function:

PHPMailer::IsMail ( )

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

Returns
void

Definition at line 401 of file class.phpmailer.php.

PHPMailer::IsQmail ( )

Sets Mailer to send message using the qmail MTA.

Returns
void

Definition at line 420 of file class.phpmailer.php.

PHPMailer::IsSendmail ( )

Sets Mailer to send message using the $Sendmail program.

Returns
void

Definition at line 409 of file class.phpmailer.php.

PHPMailer::IsSMTP ( )

Sets Mailer to send message using SMTP.

Returns
void

Definition at line 393 of file class.phpmailer.php.

PHPMailer::Lang (   $key)
protected

Returns a message in the appropriate language. protected

Returns
string

Definition at line 2165 of file class.phpmailer.php.

References SetLanguage().

Referenced by AddAnAddress(), AddAttachment(), AddEmbeddedImage(), CreateBody(), EncodeFile(), EncodeString(), MailSend(), PreSend(), SendmailSend(), set(), SetError(), SetFrom(), SmtpConnect(), and SmtpSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::MailSend (   $header,
  $body 
)
protected

Sends mail using the PHP mail() function.

Parameters
string$headerThe message headers
string$bodyThe message body protected
Returns
bool

Definition at line 732 of file class.phpmailer.php.

References $to, AddrFormat(), doCallback(), EncodeHeader(), Lang(), and SecureHeader().

Referenced by PostSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::MsgHTML (   $message,
  $basedir = '' 
)

Evaluates the message and returns modifications for inline images and backgrounds public

Returns
$message

Definition at line 2212 of file class.phpmailer.php.

References $ext, $i, $url, AddEmbeddedImage(), and IsHTML().

Here is the call graph for this function:

PHPMailer::PostSend ( )
protected

Definition at line 653 of file class.phpmailer.php.

References MailSend(), SendmailSend(), SetError(), and SmtpSend().

Referenced by Send().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::PreSend ( )
protected

Definition at line 599 of file class.phpmailer.php.

References $MIMEHeader, AddrAppend(), CreateBody(), CreateHeader(), DKIM_Add(), EncodeHeader(), HeaderLine(), Lang(), SecureHeader(), SetError(), and SetMessageType().

Referenced by Send().

Here is the call graph for this function:

Here is the caller graph for this function:

static PHPMailer::RFCDate ( )
static

Returns the proper RFC 822 formatted date. public

Returns
string

Definition at line 2133 of file class.phpmailer.php.

References $result.

PHPMailer::SecureHeader (   $str)

Strips newlines to prevent header injection. public

Parameters
string$strString
Returns
string

Definition at line 2380 of file class.phpmailer.php.

Referenced by AddrFormat(), AttachAll(), CreateHeader(), MailSend(), and PreSend().

Here is the caller graph for this function:

PHPMailer::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.

Returns
bool

Definition at line 585 of file class.phpmailer.php.

References PostSend(), PreSend(), and SetError().

Here is the call graph for this function:

PHPMailer::SendmailSend (   $header,
  $body 
)
protected

Sends mail using the $Sendmail program.

Parameters
string$headerThe message headers
string$bodyThe message body protected
Returns
bool

Definition at line 686 of file class.phpmailer.php.

References $result, doCallback(), and Lang().

Referenced by PostSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::ServerHostname ( )
protected

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

Returns
string

Definition at line 2148 of file class.phpmailer.php.

References $_SERVER, $Hostname, and $result.

Referenced by CreateHeader(), and SmtpConnect().

Here is the caller graph for this function:

PHPMailer::set (   $name,
  $value = '' 
)

Set (or reset) Class Objects (variables)

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

public

Parameters
string$nameParameter Name
mixed$valueParameter Value NOTE: will not work with arrays, there are no arrays to set/reset
Todo:
Should this not be using __set() magic function?

Definition at line 2358 of file class.phpmailer.php.

References Lang(), and SetError().

Here is the call graph for this function:

PHPMailer::SetError (   $msg)
protected

Adds the error message to the error container. protected

Returns
void

Definition at line 2116 of file class.phpmailer.php.

References $msg, and Lang().

Referenced by AddAnAddress(), AddAttachment(), AddEmbeddedImage(), EncodeFile(), EncodeString(), PostSend(), PreSend(), Send(), set(), and SetFrom().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::SetFrom (   $address,
  $name = '',
  $auto = 1 
)

Set the From and FromName properties

Parameters
string$address
string$name
Returns
boolean

Definition at line 526 of file class.phpmailer.php.

References AddAnAddress(), Lang(), and SetError().

Here is the call graph for this function:

PHPMailer::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.

Parameters
string$langcodeISO 639-1 2-character language code (e.g. Portuguese: "br")
string$lang_pathPath to the language file directory public

Definition at line 944 of file class.phpmailer.php.

References $PHPMAILER_LANG.

Referenced by Lang(), and XoopsMultiMailer\XoopsMultiMailer().

Here is the caller graph for this function:

PHPMailer::SetMessageType ( )
protected

Sets the message type. protected

Returns
void

Definition at line 1469 of file class.phpmailer.php.

References AlternativeExists(), AttachmentExists(), and InlineImageExists().

Referenced by PreSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::SetWordWrap ( )

Set the body wrapping. public

Returns
void

Definition at line 1146 of file class.phpmailer.php.

References WrapText().

Referenced by CreateBody().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::Sign (   $cert_filename,
  $key_filename,
  $key_pass 
)

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

public

Parameters
string$key_filenameParameter File Name
string$key_passPassword for private key

Definition at line 2393 of file class.phpmailer.php.

PHPMailer::SmtpClose ( )

Closes the active SMTP session if one exists.

Returns
void

Definition at line 928 of file class.phpmailer.php.

PHPMailer::SmtpConnect ( )

Initiates a connection to an SMTP server. Returns false if the operation failed. SMTP public

Returns
bool

Definition at line 864 of file class.phpmailer.php.

References $index, $Port, $SMTPDebug, Lang(), and ServerHostname().

Referenced by SmtpSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::SmtpSend (   $header,
  $body 
)
protected

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

Parameters
string$headerThe message headers
string$bodyThe message body SMTP protected
Returns
bool

Definition at line 793 of file class.phpmailer.php.

References $bcc, $cc, $to, doCallback(), Lang(), and SmtpConnect().

Referenced by PostSend().

Here is the call graph for this function:

Here is the caller graph for this function:

PHPMailer::TextLine (   $value)

Returns a formatted mail line. public

Returns
string

Definition at line 1492 of file class.phpmailer.php.

References $LE.

Referenced by CreateBody(), GetBoundary(), and GetMailMIME().

Here is the caller graph for this function:

PHPMailer::UTF8CharBoundary (   $encodedText,
  $maxLength 
)

Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string. Original written by Colin Brown. public

Parameters
string$encodedTextutf-8 QP text
int$maxLengthfind last character boundary prior to this length
Returns
int

Definition at line 1108 of file class.phpmailer.php.

Referenced by WrapText().

Here is the caller graph for this function:

static PHPMailer::ValidateAddress (   $address)
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 563 of file class.phpmailer.php.

PHPMailer::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.

Parameters
string$messageThe message to wrap
integer$lengthThe line length to wrap to
boolean$qp_modeWhether to run in Quoted-Printable mode public
Returns
string

Definition at line 1026 of file class.phpmailer.php.

References $i, $LE, FixEOL(), and UTF8CharBoundary().

Referenced by EncodeHeader(), and SetWordWrap().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

PHPMailer::$action_function = ''

Definition at line 321 of file class.phpmailer.php.

PHPMailer::$all_recipients = array()
protected

Definition at line 344 of file class.phpmailer.php.

PHPMailer::$AltBody = ''

Definition at line 116 of file class.phpmailer.php.

PHPMailer::$attachment = array()
protected
PHPMailer::$bcc = array()
protected

Definition at line 342 of file class.phpmailer.php.

Referenced by ClearBCCs(), doCallback(), and SmtpSend().

PHPMailer::$Body = ''

Definition at line 107 of file class.phpmailer.php.

PHPMailer::$boundary = array()
protected

Definition at line 348 of file class.phpmailer.php.

Referenced by AttachAll(), EndBoundary(), and GetBoundary().

PHPMailer::$cc = array()
protected

Definition at line 341 of file class.phpmailer.php.

Referenced by ClearCCs(), doCallback(), and SmtpSend().

PHPMailer::$CharSet = 'iso-8859-1'

Definition at line 56 of file class.phpmailer.php.

Referenced by GetBoundary().

PHPMailer::$ConfirmReadingTo = ''

Definition at line 169 of file class.phpmailer.php.

PHPMailer::$ContentType = 'text/plain'

Definition at line 62 of file class.phpmailer.php.

Referenced by GetBoundary().

PHPMailer::$CustomHeader = array()
protected

Definition at line 346 of file class.phpmailer.php.

PHPMailer::$DKIM_domain = ''

Definition at line 301 of file class.phpmailer.php.

PHPMailer::$DKIM_identity = ''

Definition at line 288 of file class.phpmailer.php.

PHPMailer::$DKIM_passphrase = ''

Definition at line 294 of file class.phpmailer.php.

PHPMailer::$DKIM_private = ''

Definition at line 308 of file class.phpmailer.php.

PHPMailer::$DKIM_selector = 'phpmailer'

Definition at line 281 of file class.phpmailer.php.

PHPMailer::$Encoding = '8bit'

Definition at line 69 of file class.phpmailer.php.

Referenced by GetBoundary().

PHPMailer::$error_count = 0
protected

Definition at line 350 of file class.phpmailer.php.

PHPMailer::$ErrorInfo = ''

Definition at line 75 of file class.phpmailer.php.

PHPMailer::$exceptions = false
protected

Definition at line 354 of file class.phpmailer.php.

Referenced by __construct().

PHPMailer::$From = 'root@localhost'

Definition at line 81 of file class.phpmailer.php.

PHPMailer::$FromName = 'Root User'

Definition at line 87 of file class.phpmailer.php.

Referenced by CreateHeader().

PHPMailer::$Helo = ''

Definition at line 210 of file class.phpmailer.php.

PHPMailer::$Host = 'localhost'

Definition at line 198 of file class.phpmailer.php.

PHPMailer::$Hostname = ''

Definition at line 177 of file class.phpmailer.php.

Referenced by ServerHostname().

PHPMailer::$language = array()
protected

Definition at line 349 of file class.phpmailer.php.

Referenced by GetTranslations().

PHPMailer::$Mailer = 'mail'

Definition at line 150 of file class.phpmailer.php.

PHPMailer::$message_type = ''
protected

Definition at line 347 of file class.phpmailer.php.

PHPMailer::$MessageID = ''

Definition at line 184 of file class.phpmailer.php.

PHPMailer::$MIMEBody = ''
protected

Definition at line 123 of file class.phpmailer.php.

PHPMailer::$MIMEHeader = ''
protected

Definition at line 130 of file class.phpmailer.php.

Referenced by PreSend().

PHPMailer::$Password = ''

Definition at line 235 of file class.phpmailer.php.

PHPMailer::$PluginDir = ''

Definition at line 163 of file class.phpmailer.php.

PHPMailer::$Port = 25

Definition at line 204 of file class.phpmailer.php.

Referenced by SmtpConnect().

PHPMailer::$Priority = 3

Definition at line 50 of file class.phpmailer.php.

PHPMailer::$ReplyTo = array()
protected

Definition at line 343 of file class.phpmailer.php.

PHPMailer::$Sender = ''

Definition at line 94 of file class.phpmailer.php.

PHPMailer::$Sendmail = '/usr/sbin/sendmail'

Definition at line 156 of file class.phpmailer.php.

PHPMailer::$SentMIMEMessage = ''
protected

Definition at line 137 of file class.phpmailer.php.

Referenced by GetSentMIMEMessage().

PHPMailer::$sign_cert_file = ''
protected

Definition at line 351 of file class.phpmailer.php.

PHPMailer::$sign_key_file = ''
protected

Definition at line 352 of file class.phpmailer.php.

PHPMailer::$sign_key_pass = ''
protected

Definition at line 353 of file class.phpmailer.php.

PHPMailer::$SingleTo = false

Definition at line 263 of file class.phpmailer.php.

PHPMailer::$SingleToArray = array()

Definition at line 269 of file class.phpmailer.php.

PHPMailer::$smtp = NULL
protected

Definition at line 339 of file class.phpmailer.php.

PHPMailer::$SMTPAuth = false

Definition at line 223 of file class.phpmailer.php.

PHPMailer::$SMTPDebug = false

Definition at line 248 of file class.phpmailer.php.

Referenced by SmtpConnect().

PHPMailer::$SMTPKeepAlive = false

Definition at line 256 of file class.phpmailer.php.

PHPMailer::$SMTPSecure = ''

Definition at line 217 of file class.phpmailer.php.

PHPMailer::$Subject = ''

Definition at line 100 of file class.phpmailer.php.

PHPMailer::$Timeout = 10

Definition at line 242 of file class.phpmailer.php.

PHPMailer::$to = array()
protected

Definition at line 340 of file class.phpmailer.php.

Referenced by ClearAddresses(), DKIM_Add(), doCallback(), MailSend(), and SmtpSend().

PHPMailer::$Username = ''

Definition at line 229 of file class.phpmailer.php.

PHPMailer::$Version = '5.2.1'

Definition at line 327 of file class.phpmailer.php.

PHPMailer::$WordWrap = 0

Definition at line 144 of file class.phpmailer.php.

PHPMailer::$XMailer = ''

Definition at line 333 of file class.phpmailer.php.

const PHPMailer::STOP_CONTINUE = 1

Definition at line 361 of file class.phpmailer.php.

const PHPMailer::STOP_CRITICAL = 2

Definition at line 362 of file class.phpmailer.php.

const PHPMailer::STOP_MESSAGE = 0

Definition at line 360 of file class.phpmailer.php.


The documentation for this class was generated from the following file: