PHPMailerPHP email creation and transport class
Located in /libraries/phpmailer/phpmailer.php (line 46)
| Class | Description |
|---|---|
JMail
|
Email Class. Provides a common interface to send email from the Joomla! Platform |
bool
AddAttachment
(string $path, [string $name = ''], [string $encoding = 'base64'], [string $type = ''])
bool
AddEmbeddedImage
(string $path, string $cid, [string $name = ''], [string $encoding = 'base64'], [string $type = ''])
void
AddStringAttachment
(string $string, string $filename, [string $encoding = 'base64'], [string $type = ''])
bool
AddStringEmbeddedImage
(string $string, string $cid, [string $name = ''], [string $encoding = 'base64'], [string $type = ''])
void
doCallback
(boolean $isSent, string $to, string $cc, string $bcc, string $subject, string $body, [string $from = null])
string
$action_function
= '' (line 413)
Callback Action function name.
The function that handles the result of the send email action. It is called out by Send() for each email sent.
Value can be:
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 string $from email address of sender
bool
$AllowEmpty
= false (line 345)
Should we allow sending messages with empty body?
array
$all_recipients
= array() (line 460)
string
$AltBody
= '' (line 129)
The plain-text message body.
This body can be read by mail clients that do not have HTML email capability such as mutt & Eudora. Clients that can read HTML will view the normal Body.
array
$attachment
= array() (line 465)
string
$AuthType
= '' (line 279)
Sets SMTP auth type. Options are LOGIN | PLAIN | NTLM | CRAM-MD5 (default LOGIN)
array
$bcc
= array() (line 450)
array
$boundary
= array() (line 480)
array
$cc
= array() (line 445)
string
$CharSet
= 'iso-8859-1' (line 62)
Sets the CharSet of the message.
string
$ConfirmReadingTo
= '' (line 199)
Sets the email address that a reading confirmation will be sent.
string
$ContentType
= 'text/plain' (line 68)
Sets the Content-type of the message.
array
$CustomHeader
= array() (line 470)
string
$Debugoutput
= "echo" (line 311)
Sets the function/method to use for debugging output.
Right now we only honor "echo" or "error_log"
string
$DKIM_domain
= '' (line 383)
Used with DKIM Singing
required if DKIM is enabled, in format of email address 'domain.com'
string
$DKIM_identity
= '' (line 369)
Used with DKIM Signing
required if DKIM is enabled, in format of email address 'you@yourdomain.com' typically used as the source of the email
string
$DKIM_passphrase
= '' (line 376)
Used with DKIM Signing
optional parameter if your private key requires a passphras
string
$DKIM_private
= '' (line 390)
Used with DKIM Signing
required if DKIM is enabled, path to private key file
string
$DKIM_selector
= '' (line 362)
Used with DKIM Signing required parameter if DKIM is enabled
domain selector example domainkey
bool
$do_verp
= false (line 333)
Should we generate VERP addresses when sending via SMTP?
string
$Encoding
= '8bit' (line 75)
Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".
string
$ErrorInfo
= '' (line 81)
Holds the most recent mailer error message.
integer
$error_count
= 0 (line 490)
boolean
$exceptions
= false (line 510)
string
$From
= 'root@localhost' (line 87)
Sets the From email address for the message.
string
$FromName
= 'Root User' (line 93)
Sets the From name of the message.
string
$Helo
= '' (line 249)
Sets the SMTP HELO of the message (Default is $Hostname).
string
$Host
= 'localhost' (line 237)
Sets the SMTP hosts.
All hosts must be separated by a semicolon. You can also specify a different port for each host by using this format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com"). Hosts will be tried in order.
string
$Hostname
= '' (line 207)
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'.
string
$Ical
= '' (line 139)
An iCal message part body
Only supported in simple alt or alt_inline message types To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator
array
$language
= array() (line 485)
string
$LE
= "\n" (line 353)
Provides the ability to change the generic line ending
NOTE: The default remains '\n'. We force CRLF where we KNOW it must be used via self::CRLF
string
$Mailer
= 'mail' (line 173)
Method to send mail: ("mail", "sendmail", or "smtp").
string
$mailHeader
= '' (line 160)
Stores the extra header list which CreateHeader() doesn't fold in
string
$MessageDate
= '' (line 221)
Sets the message Date to be used in the Date header.
If empty, the current date will be added.
string
$MessageID
= '' (line 214)
Sets the message ID to be used in the Message-Id header.
If empty, a unique id will be generated.
string
$message_type
= '' (line 475)
string
$MIMEBody
= '' (line 146)
Stores the complete compiled MIME message body.
string
$MIMEHeader
= '' (line 153)
Stores the complete compiled MIME message headers.
string
$Password
= '' (line 273)
Sets SMTP password.
string
$PluginDir
= '' (line 193)
Path to PHPMailer plugins. Useful if the SMTP class is in a different directory than the PHP include path.
int
$Port
= 25 (line 243)
Sets the default SMTP server port.
int
$Priority
= 3 (line 56)
Email priority (1 = High, 3 = Normal, 5 = low).
string
$Realm
= '' (line 285)
Sets SMTP realm.
array
$ReplyTo
= array() (line 455)
string
$ReturnPath
= '' (line 107)
Sets the Return-Path of the message. If empty, it will be set to either From or Sender.
string
$Sender
= '' (line 100)
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.
string
$Sendmail
= '/usr/sbin/sendmail' (line 179)
Sets the path of the sendmail program.
string
$sign_cert_file
= '' (line 495)
string
$sign_key_file
= '' (line 500)
string
$sign_key_pass
= '' (line 505)
bool
$SingleTo
= false (line 326)
Provides the ability to have the TO field process individual
emails, instead of sending to entire TO addresses
bool
$SingleToArray
= array() (line 339)
If SingleTo is true, this provides the array to hold the email addresses
bool
$SMTPAuth
= false (line 261)
Sets SMTP authentication. Utilizes the Username and Password variables.
bool
$SMTPDebug
= false (line 304)
Sets SMTP class debugging on or off.
bool
$SMTPKeepAlive
= false (line 319)
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().
string
$SMTPSecure
= '' (line 255)
Sets connection prefix. Options are "", "ssl" or "tls"
string
$Subject
= '' (line 113)
Sets the Subject of the message.
int
$Timeout
= 10 (line 298)
Sets the SMTP server timeout in seconds.
This function will not work with the win32 version.
array
$to
= array() (line 440)
string
$Username
= '' (line 267)
Sets SMTP username.
boolean
$UseSendmailOptions
= true (line 186)
Determine if mail() uses a fully sendmail compatible MTA that
supports sendmail's "-oi -f" options
string
$Version
= '5.2.6' (line 419)
Sets the PHPMailer Version number
int
$WordWrap
= 0 (line 167)
Sets word wrapping on the body of the message to a given number of characters.
string
$Workstation
= '' (line 291)
Sets SMTP workstation.
string
$XMailer
= '' (line 425)
What to use in the X-Mailer header
Try to map a file name to a MIME type, default to application/octet-stream
Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe.
Works similarly to the one in PHP >= 5.2.0
Normalize 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
Check that a string looks roughly like an email address should
Static so it can be used without instantiation, public so people can overload Conforms to RFC5322: Uses *correct* regex on which FILTER_VALIDATE_EMAIL is based; So why not use FILTER_VALIDATE_EMAIL? Because it was broken to not allow a@b type valid addresses :(
Gets the MIME type of the embedded or inline image
Constructor
Adds a "To" address.
Adds an address to one of the recipient arrays
Addresses that have been added already return false, but do not throw exceptions
Adds an attachment from a path on the filesystem.
Returns false if the file could not be found or accessed.
Adds a "Bcc" address.
Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
Adds a "Cc" address.
Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
Adds a custom header. $name value can be overloaded to contain
both header name and value (name:value)
Add an embedded attachment from a file.
This can include images, sounds, and just about any other document type.
Creates recipient headers.
Adds a "Reply-to" address.
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.
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'.
Does this message have an alternative body set?
Attaches all fs, string, and binary attachments to the message.
Returns an empty string on failure.
Returns true if an attachment (non-inline) is present.
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
Clears all recipients assigned in the TO array. Returns void.
Clears all recipients assigned in the TO, CC and BCC array. Returns void.
Clears all previously set filesystem, string, and binary attachments. Returns void.
Clears all recipients assigned in the BCC array. Returns void.
Clears all recipients assigned in the ReplyTo array. Returns void.
Assembles the message body. Returns an empty string on failure.
Create the DKIM header, body, as new header
Generate DKIM Canonicalization Body
Generate DKIM Canonicalization Header
Set the private key file and password to sign the message.
Perform callback
Outputs debugging info via user-defined method
Encodes attachment in requested format.
Returns an empty string on failure.
Encode a header string to best (shortest) of Q, B, quoted or none.
Encode string to q encoding.
Encode string to RFC2045 (6.7) quoted-printable format
Wrapper to preserve BC for old QP encoding function that was removed
Encodes string to requested format.
Returns an empty string on failure.
Returns the end of a message boundary.
Changes every end of line from CRLF, CR or LF to $this->LE.
Returns the start of a message boundary.
Returns the MIME message (headers and body). Only really valid post PreSend().
Checks if a string contains multibyte characters.
Returns a formatted header line.
Convert an HTML string into a plain text version
Returns true if an inline attachment is present.
Returns a message in the appropriate language.
Sends mail using the PHP mail() function.
Creates a message from an HTML string, making 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
Actual Email transport function
Send the email via the selected mechanism
Strips newlines to prevent header injection.
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.
Sends mail using the $Sendmail program.
Returns the server hostname or 'localhost.localdomain' if unknown.
Set (or reset) Class Objects (variables)
Usage Example: $page->set('X-Priority', '3');
Adds the error message to the error container.
Set the From and FromName properties
Sets the language for all class error messages.
Returns false if it cannot load the language file. The default language is English.
Set the private key file and password to sign the message.
Initiates a connection to an SMTP server.
Returns false if the operation failed.
Sends mail via SMTP using PhpSMTP Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string.
Original written by Colin Brown.
Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.
Original written by philippe.
Documentation generated on Tue, 19 Nov 2013 15:10:38 +0100 by phpDocumentor 1.4.3