PHP email creation and transport class
Located in /libraries/phpmailer/phpmailer.php (line 46)
Class | Description |
---|---|
![]() |
Email Class. Provides a common interface to send email from the Joomla! Platform |
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
Should we allow sending messages with empty body?
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.
Sets SMTP auth type. Options are LOGIN | PLAIN | NTLM | CRAM-MD5 (default LOGIN)
Sets the CharSet of the message.
Sets the email address that a reading confirmation will be sent.
Sets the Content-type of the message.
Sets the function/method to use for debugging output.
Right now we only honor "echo" or "error_log"
Used with DKIM Singing
required if DKIM is enabled, in format of email address 'domain.com'
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
Used with DKIM Signing
optional parameter if your private key requires a passphras
Used with DKIM Signing
required if DKIM is enabled, path to private key file
Used with DKIM Signing required parameter if DKIM is enabled
domain selector example domainkey
Should we generate VERP addresses when sending via SMTP?
Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".
Holds the most recent mailer error message.
Sets the From email address for the message.
Sets the From name of the message.
Sets the SMTP HELO of the message (Default is $Hostname).
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.
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'.
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
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
Method to send mail: ("mail", "sendmail", or "smtp").
Stores the extra header list which CreateHeader() doesn't fold in
Sets the message Date to be used in the Date header.
If empty, the current date will be added.
Sets the message ID to be used in the Message-Id header.
If empty, a unique id will be generated.
Stores the complete compiled MIME message body.
Stores the complete compiled MIME message headers.
Sets SMTP password.
Path to PHPMailer plugins. Useful if the SMTP class is in a different directory than the PHP include path.
Sets the default SMTP server port.
Email priority (1 = High, 3 = Normal, 5 = low).
Sets SMTP realm.
Sets the Return-Path of the message. If empty, it will be set to either From or Sender.
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.
Sets the path of the sendmail program.
Provides the ability to have the TO field process individual
emails, instead of sending to entire TO addresses
If SingleTo is true, this provides the array to hold the email addresses
Sets SMTP authentication. Utilizes the Username and Password variables.
Sets SMTP class debugging on or off.
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().
Sets connection prefix. Options are "", "ssl" or "tls"
Sets the Subject of the message.
Sets the SMTP server timeout in seconds.
This function will not work with the win32 version.
Sets SMTP username.
Determine if mail() uses a fully sendmail compatible MTA that
supports sendmail's "-oi -f" options
Sets the PHPMailer Version number
Sets word wrapping on the body of the message to a given number of characters.
Sets SMTP workstation.
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