Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct ($exceptions=null) | |
__destruct () | |
isHTML ($isHtml=true) | |
isSMTP () | |
isMail () | |
isSendmail () | |
isQmail () | |
addAddress ($address, $name='') | |
addCC ($address, $name='') | |
addBCC ($address, $name='') | |
addReplyTo ($address, $name='') | |
parseAddresses ($addrstr, $useimap=true) | |
setFrom ($address, $name='', $auto=true) | |
getLastMessageID () | |
idnSupported () | |
punyencodeAddress ($address) | |
send () | |
preSend () | |
postSend () | |
getSMTPInstance () | |
smtpConnect ($options=null) | |
smtpClose () | |
setLanguage ($langcode='en', $lang_path='') | |
getTranslations () | |
addrAppend ($type, $addr) | |
addrFormat ($addr) | |
wrapText ($message, $length, $qp_mode=false) | |
utf8CharBoundary ($encodedText, $maxLength) | |
setWordWrap () | |
createHeader () | |
getMailMIME () | |
getSentMIMEMessage () | |
createBody () | |
headerLine ($name, $value) | |
textLine ($value) | |
addAttachment ($path, $name='', $encoding='base64', $type='', $disposition='attachment') | |
getAttachments () | |
encodeString ($str, $encoding='base64') | |
encodeHeader ($str, $position='text') | |
hasMultiBytes ($str) | |
has8bitChars ($text) | |
base64EncodeWrapMB ($str, $linebreak=null) | |
encodeQP ($string, $line_max=76) | |
encodeQPphp ( $string, $line_max=76, $space_conv=false) | |
encodeQ ($str, $position='text') | |
addStringAttachment ( $string, $filename, $encoding='base64', $type='', $disposition='attachment') | |
addEmbeddedImage ($path, $cid, $name='', $encoding='base64', $type='', $disposition='inline') | |
addStringEmbeddedImage ( $string, $cid, $name='', $encoding='base64', $type='', $disposition='inline') | |
inlineImageExists () | |
attachmentExists () | |
alternativeExists () | |
clearQueuedAddresses ($kind) | |
clearAddresses () | |
clearCCs () | |
clearBCCs () | |
clearReplyTos () | |
clearAllRecipients () | |
clearAttachments () | |
clearCustomHeaders () | |
isError () | |
fixEOL ($str) | |
addCustomHeader ($name, $value=null) | |
getCustomHeaders () | |
msgHTML ($message, $basedir='', $advanced=false) | |
html2text ($html, $advanced=false) | |
set ($name, $value='') | |
secureHeader ($str) | |
sign ($cert_filename, $key_filename, $key_pass, $extracerts_filename='') | |
DKIM_QP ($txt) | |
DKIM_Sign ($signHeader) | |
DKIM_HeaderC ($signHeader) | |
DKIM_BodyC ($body) | |
DKIM_Add ($headers_line, $subject, $body) | |
quotedString ($str) | |
getToAddresses () | |
getCcAddresses () | |
getBccAddresses () | |
getReplyToAddresses () | |
getAllRecipientAddresses () | |
Fonctions membres publiques statiques | |
static | validateAddress ($address, $patternselect=null) |
static | rfcDate () |
static | _mime_types ($ext='') |
static | filenameToType ($filename) |
static | mb_pathinfo ($path, $options=null) |
static | normalizeBreaks ($text, $breaktype="\") |
static | hasLineLongerThanMax ($str) |
Attributs publics statiques | |
static | $validator = 'auto' |
Fonctions membres protégées | |
edebug ($str) | |
addOrEnqueueAnAddress ($kind, $address, $name) | |
addAnAddress ($kind, $address, $name='') | |
sendmailSend ($header, $body) | |
mailSend ($header, $body) | |
smtpSend ($header, $body) | |
generateId () | |
getBoundary ($boundary, $charSet, $contentType, $encoding) | |
endBoundary ($boundary) | |
setMessageType () | |
attachAll ($disposition_type, $boundary) | |
encodeFile ($path, $encoding='base64') | |
setError ($msg) | |
serverHostname () | |
lang ($key) | |
doCallback ($isSent, $to, $cc, $bcc, $subject, $body, $from) | |
Fonctions membres protégées statiques | |
static | isShellSafe ($string) |
static | isPermittedPath ($path) |
Attributs protégés | |
$MIMEBody = '' | |
$MIMEHeader = '' | |
$mailHeader = '' | |
$smtp = null | |
$to = array() | |
$cc = array() | |
$bcc = array() | |
$ReplyTo = array() | |
$all_recipients = array() | |
$RecipientsQueue = array() | |
$ReplyToQueue = array() | |
$attachment = array() | |
$CustomHeader = array() | |
$lastMessageID = '' | |
$message_type = '' | |
$boundary = array() | |
$language = array() | |
$error_count = 0 | |
$sign_cert_file = '' | |
$sign_key_file = '' | |
$sign_extracerts_file = '' | |
$sign_key_pass = '' | |
$exceptions = false | |
$uniqueid = '' | |
Fonctions membres privées | |
mailPassthru ($to, $subject, $body, $header, $params) | |
__construct | ( | $exceptions = null | ) |
Constructor.
boolean | $exceptions | Should we throw external exceptions? |
Références $exceptions, et null.
__destruct | ( | ) |
Destructor.
Références smtpClose().
|
static |
Get the MIME type for a file extension.
string | $ext | File extension public |
addAddress | ( | $address, | |
$name = '' |
|||
) |
Add a "To" address.
string | $address | The email address to send to |
string | $name |
Références $name, et addOrEnqueueAnAddress().
|
protected |
Add an address to one of the recipient arrays or to the ReplyTo array. Addresses that have been added already return false, but do not throw exceptions.
string | $kind | One of 'to', 'cc', 'bcc', or 'ReplyTo' |
string | $address | The email address to send, resp. to reply to |
string | $name |
phpmailerException |
Références $name, edebug(), lang(), setError(), et validateAddress().
addAttachment | ( | $path, | |
$name = '' , |
|||
$encoding = 'base64' , |
|||
$type = '' , |
|||
$disposition = 'attachment' |
|||
) |
Add an attachment from a path on the filesystem. Never use a user-supplied path to a file! Returns false if the file could not be found or read. Explicitly does not support passing URLs; PHPMailer is not an HTTP client. If you need to do that, fetch the resource yourself and pass it in via a local file or string.
string | $path | Path to the attachment. |
string | $name | Overrides the attachment name. |
string | $encoding | File encoding (see $Encoding). |
string | $type | File extension (MIME) type. |
string | $disposition | Disposition to use |
phpmailerException |
Références $name, $path, $type, edebug(), lang(), et setError().
addBCC | ( | $address, | |
$name = '' |
|||
) |
Add a "BCC" address.
string | $address | The email address to send to |
string | $name |
Références $name, et addOrEnqueueAnAddress().
addCC | ( | $address, | |
$name = '' |
|||
) |
Add a "CC" address.
string | $address | The email address to send to |
string | $name |
Références $name, et addOrEnqueueAnAddress().
addCustomHeader | ( | $name, | |
$value = null |
|||
) |
addEmbeddedImage | ( | $path, | |
$cid, | |||
$name = '' , |
|||
$encoding = 'base64' , |
|||
$type = '' , |
|||
$disposition = 'inline' |
|||
) |
Add an embedded (inline) attachment from a file. This can include images, sounds, and just about any other document type. These differ from 'regular' attachments in that they are intended to be displayed inline with the message, not just attached for download. This is used in HTML messages that embed the images the HTML refers to using the $cid value. Never use a user-supplied path to a file!
string | $path | Path to the attachment. |
string | $cid | Content ID of the attachment; Use this to reference the content when using an embedded image in HTML. |
string | $name | Overrides the attachment name. |
string | $encoding | File encoding (see $Encoding). |
string | $type | File MIME type. |
string | $disposition | Disposition to use |
Références $name, $path, $type, lang(), et setError().
Référencé par msgHTML().
|
protected |
Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still be modified after calling this function), addition of such addresses is delayed until send(). Addresses that have been added already return false, but do not throw exceptions.
string | $kind | One of 'to', 'cc', 'bcc', or 'ReplyTo' |
string | $address | The email address to send, resp. to reply to |
string | $name |
phpmailerException |
Références $name, $params, edebug(), has8bitChars(), idnSupported(), lang(), et setError().
Référencé par addAddress(), addBCC(), addCC(), et addReplyTo().
addrAppend | ( | $type, | |
$addr | |||
) |
Create recipient headers. public
string | $type | |
array | $addr | An array of recipient, where each recipient is a 2-element indexed array with element 0 containing an address and element 1 containing a name, like: array(array('joe@e', 'Joe User'), array(' xamp le.co mzoe@e', 'Zoe User')) xamp le.co m |
Références $LE, $type, et addrFormat().
Référencé par createHeader(), et preSend().
addReplyTo | ( | $address, | |
$name = '' |
|||
) |
Add a "Reply-To" address.
string | $address | The email address to reply to |
string | $name |
Références $name, et addOrEnqueueAnAddress().
addrFormat | ( | $addr | ) |
Format an address for use in a message header. public
array | $addr | A 2-element indexed array, element 0 containing an address, element 1 containing a name like array('joe@e', 'Joe User') xamp le.co m |
Références encodeHeader(), et secureHeader().
Référencé par addrAppend(), createHeader(), et mailSend().
addStringAttachment | ( | $string, | |
$filename, | |||
$encoding = 'base64' , |
|||
$type = '' , |
|||
$disposition = 'attachment' |
|||
) |
Add a string or binary attachment (non-filesystem). This method can be used to attach ascii or binary data, such as a BLOB record from a database.
string | $string | String attachment data. |
string | $filename | Name of the attachment. |
string | $encoding | File encoding (see $Encoding). |
string | $type | File extension (MIME) type. |
string | $disposition | Disposition to use |
Références $type.
addStringEmbeddedImage | ( | $string, | |
$cid, | |||
$name = '' , |
|||
$encoding = 'base64' , |
|||
$type = '' , |
|||
$disposition = 'inline' |
|||
) |
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'.
string | $string | The attachment binary data. |
string | $cid | Content ID of the attachment; Use this to reference the content when using an embedded image in HTML. |
string | $name | |
string | $encoding | File encoding (see $Encoding). |
string | $type | MIME type. |
string | $disposition | Disposition to use |
Référencé par msgHTML().
alternativeExists | ( | ) |
Check if this message has an alternative body set.
Référencé par msgHTML(), preSend(), et setMessageType().
|
protected |
Attach all file, string, and binary attachments to the message. Returns an empty string on failure. protected
string | $disposition_type | |
string | $boundary |
Références $attachment, $boundary, $LE, $mime, $name, $path, $type, encodeFile(), encodeHeader(), encodeString(), isError(), quotedString(), et secureHeader().
Référencé par createBody().
attachmentExists | ( | ) |
Check if an attachment (non-inline) is present.
Références $attachment.
Référencé par setMessageType().
base64EncodeWrapMB | ( | $str, | |
$linebreak = null |
|||
) |
Encode and wrap long multibyte strings for mail headers without breaking lines within a character. Adapted from a function by paravoid public string $str multi-byte text to wrap encode string $linebreak string to use as linefeed/end-of-line string
Références $i, $LE, $offset, $start, et null.
Référencé par encodeHeader().
clearAddresses | ( | ) |
clearAllRecipients | ( | ) |
Clear all recipient types.
clearAttachments | ( | ) |
Clear all filesystem, string, and binary attachments.
clearBCCs | ( | ) |
clearCCs | ( | ) |
clearCustomHeaders | ( | ) |
Clear all custom headers.
clearQueuedAddresses | ( | $kind | ) |
Clear queued addresses of given kind. protected
string | $kind | 'to', 'cc', or 'bcc' |
Références $params, et $RecipientsQueue.
Référencé par clearAddresses(), clearBCCs(), et clearCCs().
clearReplyTos | ( | ) |
Clear all ReplyTo recipients.
createBody | ( | ) |
Assemble the message body. Returns an empty string on failure. public
phpmailerException |
Références $CharSet, $Encoding, $file, $LE, $parts, $uniqueid, attachAll(), elseif, encodeString(), endBoundary(), generateId(), getBoundary(), getMailMIME(), has8bitChars(), headerLine(), isError(), lang(), null, setWordWrap(), et textLine().
Référencé par preSend().
createHeader | ( | ) |
Assemble message headers. public
Références $MessageID, addrAppend(), addrFormat(), elseif, encodeHeader(), getMailMIME(), headerLine(), secureHeader(), et serverHostname().
Référencé par preSend().
DKIM_Add | ( | $headers_line, | |
$subject, | |||
$body | |||
) |
Create the DKIM header and body in a new message header. public
string | $headers_line | Header lines |
string | $subject | Subject |
string | $body | Body |
Références $current, $date, $subject, $to, DKIM_BodyC(), DKIM_HeaderC(), DKIM_QP(), DKIM_Sign(), et elseif.
Référencé par preSend().
DKIM_BodyC | ( | $body | ) |
Generate a DKIM canonicalization body. public
string | $body | Message Body |
Référencé par DKIM_Add().
DKIM_HeaderC | ( | $signHeader | ) |
Generate a DKIM canonicalization header. public
string | $signHeader | Header |
Référencé par DKIM_Add().
DKIM_QP | ( | $txt | ) |
Quoted-Printable-encode a DKIM header. public
string | $txt |
Références $i.
Référencé par DKIM_Add().
DKIM_Sign | ( | $signHeader | ) |
Generate a DKIM signature. public
string | $signHeader |
phpmailerException |
Référencé par DKIM_Add().
|
protected |
Perform a callback.
boolean | $isSent | |
array | $to | |
array | $cc | |
array | $bcc | |
string | $subject | |
string | $body | |
string | $from |
Références $bcc, $cc, $params, $subject, et $to.
Référencé par mailSend(), sendmailSend(), et smtpSend().
|
protected |
Output debugging info via user-defined method. Only generates output if SMTP debug output is enabled (
string | $str |
Références ENT_QUOTES.
Référencé par addAnAddress(), addAttachment(), addOrEnqueueAnAddress(), postSend(), preSend(), setFrom(), PHPMailerOAuth\smtpConnect(), et smtpConnect().
|
protected |
Encode a file attachment in requested format. Returns an empty string on failure.
string | $path | The full path to the file |
string | $encoding | The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' |
phpmailerException | protected |
Références $path, encodeString(), lang(), et setError().
Référencé par attachAll().
encodeHeader | ( | $str, | |
$position = 'text' |
|||
) |
Encode a header string optimally. Picks shortest of Q, B, quoted-printable or none. public
string | $str | |
string | $position |
PhpMissingBreakStatementInspection
Références $position, base64EncodeWrapMB(), encodeQ(), hasMultiBytes(), et wrapText().
Référencé par addrFormat(), attachAll(), createHeader(), mailPassthru(), et preSend().
encodeQ | ( | $str, | |
$position = 'text' |
|||
) |
Encode a string using 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
PhpMissingBreakStatementInspection
Références $position.
Référencé par encodeHeader().
encodeQP | ( | $string, | |
$line_max = 76 |
|||
) |
Encode a string in quoted-printable format. According to RFC2045 section 6.7. public
string | $string | The text to encode |
integer | $line_max | Number of chars allowed on a line before wrapping |
Référencé par encodeQPphp(), et encodeString().
encodeQPphp | ( | $string, | |
$line_max = 76 , |
|||
$space_conv = false |
|||
) |
Backward compatibility wrapper for an old QP encoding function that was removed.
string | $string | |
integer | $line_max | |
boolean | $space_conv |
$space_conv | PhpUnusedParameterInspection |
Références encodeQP().
encodeString | ( | $str, | |
$encoding = 'base64' |
|||
) |
Encode a string in requested format. Returns an empty string on failure.
string | $str | The text to encode |
string | $encoding | The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' public |
Références $LE, encodeQP(), fixEOL(), lang(), et setError().
Référencé par attachAll(), createBody(), et encodeFile().
|
protected |
Return the end of a message boundary. protected
string | $boundary |
Référencé par createBody().
|
static |
Map a file name to a MIME type. Defaults to 'application/octet-stream', i.e.. arbitrary binary data.
string | $filename | A file name or full path, does not need to exist as a file |
fixEOL | ( | $str | ) |
Ensure consistent line endings in a string. Changes every end of line from CRLF, CR or LF to $this->LE. public
string | $str | String to fixEOL |
Référencé par encodeString(), et wrapText().
|
protected |
getAllRecipientAddresses | ( | ) |
Allows for public read access to 'all_recipients' property.
Références $all_recipients.
getAttachments | ( | ) |
getBccAddresses | ( | ) |
|
protected |
Return the start of a message boundary. protected
string | $boundary | |
string | $charSet | |
string | $contentType | |
string | $encoding |
Références $boundary, $CharSet, $ContentType, $Encoding, $LE, headerLine(), et textLine().
Référencé par createBody().
getCcAddresses | ( | ) |
getCustomHeaders | ( | ) |
getLastMessageID | ( | ) |
Return the Message-ID header of the last email. Technically this is the value from the last time the headers were created, but it's also the message ID of the last sent message except in pathological cases.
Références $lastMessageID.
getMailMIME | ( | ) |
Get the message MIME type headers. public
Références $LE, headerLine(), et textLine().
Référencé par createBody(), et createHeader().
getReplyToAddresses | ( | ) |
getSentMIMEMessage | ( | ) |
Returns the whole MIME message. Includes complete headers and body. Only valid post preSend().
Références $MIMEBody.
getSMTPInstance | ( | ) |
Get an instance to use for SMTP operations. Override this function to load your own SMTP implementation
Références $smtp.
Référencé par PHPMailerOAuth\smtpConnect(), et smtpConnect().
getToAddresses | ( | ) |
getTranslations | ( | ) |
has8bitChars | ( | $text | ) |
Does a string contain any 8-bit chars (in any charset)?
string | $text |
Références $text.
Référencé par addOrEnqueueAnAddress(), createBody(), punyencodeAddress(), et setFrom().
|
static |
Detect if a string contains a line longer than the maximum line length allowed.
string | $str |
hasMultiBytes | ( | $str | ) |
Check if a string contains multi-byte characters. public
string | $str | multi-byte text to wrap encode |
Référencé par encodeHeader().
headerLine | ( | $name, | |
$value | |||
) |
Format a header line. public
string | $name | |
string | $value |
Références $LE, $name, et $value.
Référencé par createBody(), createHeader(), getBoundary(), getMailMIME(), et preSend().
html2text | ( | $html, | |
$advanced = false |
|||
) |
Convert an HTML string into plain text. This is used by msgHTML(). Note - older versions of this function used a bundled advanced converter which was been removed for license reasons in #232. Example usage: // Use default conversion $plain = $mail->html2text($html); // Use your own custom converter $plain = $mail->html2text($html, function($html) { $converter = new MyHtml2text($html); return $converter->get_text(); });
string | $html | The HTML text to convert |
boolean | callable | $advanced | Any boolean value to use the internal converter, or provide your own callable for custom conversion. |
Références $html, et ENT_QUOTES.
Référencé par msgHTML().
idnSupported | ( | ) |
Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the "intl" and "mbstring" PHP extensions.
Référencé par addOrEnqueueAnAddress(), punyencodeAddress(), et setFrom().
inlineImageExists | ( | ) |
Check if an inline attachment is present. public
Références $attachment.
Référencé par setMessageType().
isError | ( | ) |
Check if an error occurred. public
Référencé par attachAll(), et createBody().
isHTML | ( | $isHtml = true | ) |
Sets message type to HTML or plain.
boolean | $isHtml | True for HTML mode. |
Référencé par msgHTML().
isMail | ( | ) |
Send messages using PHP's mail() function.
Référencé par Mail\useSendmail(), et Mail\useSmtp().
|
staticprotected |
Check whether a file path is of a permitted type. Used to reject URLs and phar files from functions that access local file paths, such as addAttachment.
string | $path | A relative or absolute path to a file. |
Références $path.
isQmail | ( | ) |
Send messages using qmail.
isSendmail | ( | ) |
Send messages using $Sendmail.
|
staticprotected |
Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.
Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.
string | $string | The string to be validated |
Références $i.
isSMTP | ( | ) |
|
protected |
Get an error message in the current language. protected
string | $key |
Références $key, language, et setLanguage().
Référencé par addAnAddress(), addAttachment(), addEmbeddedImage(), addOrEnqueueAnAddress(), createBody(), DKIM_Sign(), encodeFile(), encodeString(), mailSend(), preSend(), sendmailSend(), set(), setError(), setFrom(), PHPMailerOAuth\smtpConnect(), smtpConnect(), et smtpSend().
|
private |
Call mail() in a safe_mode-aware fashion. Also, unless sendmail_path points to sendmail (or something that claims to be sendmail), don't pass params (not a perfect fix, but it will do)
string | $to | To |
string | $subject | Subject |
string | $body | Message Body |
string | $header | Additional Header(s) |
string | $params | Params private |
Références $params, $subject, $to, encodeHeader(), et secureHeader().
Référencé par mailSend().
|
protected |
Send mail using the PHP mail() function.
string | $header | The message headers |
string | $body | The message body phpmailerException protected boolean |
Références $params, $to, addrFormat(), doCallback(), lang(), mailPassthru(), null, et validateAddress().
Référencé par postSend().
|
static |
Multi-byte-safe pathinfo replacement. Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. Works similarly to the one in PHP >= 5.2.0 string $path A filename or path, does not need to exist as a file integer|string $options Either a PATHINFO_* constant, or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2 string|array
msgHTML | ( | $message, | |
$basedir = '' , |
|||
$advanced = false |
|||
) |
Create a message body from an HTML string. Automatically inlines images and creates a plain-text version by converting the HTML, overwriting any existing values in Body and AltBody. Do not source $message content from user input! $basedir is prepended when handling relative URLs, e.g.
and must not be empty will look for an image file in $basedir/images/a.png and convert it to inline. If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email) If you don't want to apply these transformations to your HTML, just set Body and AltBody directly. public
string | $message | HTML message string |
string | $basedir | Absolute path to a base directory to prepend to relative paths to images |
boolean | callable | $advanced | Whether to use the internal HTML to text converter or your own custom converter |
Références $Body, $data, $images, $message, $url, addEmbeddedImage(), addStringEmbeddedImage(), alternativeExists(), html2text(), isHTML(), et normalizeBreaks().
|
static |
Normalize line breaks in a string. Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. Defaults to CRLF (for message bodies) and preserves consecutive breaks.
string | $text | |
string | $breaktype | What kind of line break to use, defaults to CRLF |
Références $text.
Référencé par msgHTML().
parseAddresses | ( | $addrstr, | |
$useimap = true |
|||
) |
Parse and validate a string containing one or more RFC822-style comma-separated email addresses of the form "display name <address>" into an array of name/address pairs. Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. Note that quotes in the name part are removed.
string | $addrstr | The address list string |
bool | $useimap | Whether to use the IMAP extension to parse the list |
Références $list, $name, et validateAddress().
postSend | ( | ) |
Actually send a message. Send the email via the selected mechanism
phpmailerException |
Références edebug(), mailSend(), sendmailSend(), setError(), et smtpSend().
Référencé par send().
preSend | ( | ) |
Prepare a message for sending.
phpmailerException |
Références $MIMEHeader, $params, addrAppend(), alternativeExists(), createBody(), createHeader(), DKIM_Add(), edebug(), encodeHeader(), headerLine(), lang(), punyencodeAddress(), secureHeader(), setError(), setMessageType(), et validateAddress().
Référencé par send().
punyencodeAddress | ( | $address | ) |
Converts IDN in given email address to its ASCII form, also known as punycode, if possible. Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. This function silently returns unmodified address if:
string | $address | The email address to convert |
Références has8bitChars(), et idnSupported().
Référencé par preSend().
quotedString | ( | $str | ) |
If a string contains any "special" characters, double-quote the name, and escape any double quotes with a backslash.
string | $str |
Référencé par attachAll().
|
static |
Return an RFC 822 formatted date. public
secureHeader | ( | $str | ) |
Strip newlines to prevent header injection. public
string | $str |
Référencé par addrFormat(), attachAll(), createHeader(), mailPassthru(), et preSend().
send | ( | ) |
Create a message and send it. Uses the sending method specified by $Mailer.
phpmailerException |
Références postSend(), preSend(), et setError().
|
protected |
Send mail using the $Sendmail program.
string | $header | The message headers |
string | $body | The message body |
phpmailerException | protected |
Références doCallback(), et lang().
Référencé par postSend().
|
protected |
Get the server hostname. Returns 'localhost.localdomain' if unknown. protected
Références $Hostname, et elseif.
Référencé par createHeader(), PHPMailerOAuth\smtpConnect(), et smtpConnect().
set | ( | $name, | |
$value = '' |
|||
) |
Set or reset instance properties. You should avoid this function - it's more verbose, less efficient, more error-prone and harder to debug than setting properties directly. Usage Example: ‘$mail->set('SMTPSecure’, 'tls');` is the same as: ‘$mail->SMTPSecure = 'tls’;` public
string | $name | The property name to set |
mixed | $value | The value to set the property to |
Références $name, $value, lang(), et setError().
|
protected |
Add an error message to the error container. protected
string | $msg |
Références lang().
Référencé par addAnAddress(), addAttachment(), addEmbeddedImage(), addOrEnqueueAnAddress(), encodeFile(), encodeString(), postSend(), preSend(), InstallerModelManage\publish(), UsersModelMail\send(), send(), set(), setFrom(), et smtpSend().
setFrom | ( | $address, | |
$name = '' , |
|||
$auto = true |
|||
) |
Set the From and FromName properties.
string | $address | |
string | $name | |
boolean | $auto | Whether to also set the Sender address, defaults to true |
phpmailerException |
Références $name, edebug(), has8bitChars(), idnSupported(), lang(), setError(), et validateAddress().
setLanguage | ( | $langcode = 'en' , |
|
$lang_path = '' |
|||
) |
Set the language for error messages. Returns false if it cannot load the language file. The default language is English.
string | $langcode | ISO 639-1 2-character language code (e.g. French is "fr") |
string | $lang_path | Path to the language file directory, with trailing separator (slash) |
Références $PHPMAILER_LANG, DIRECTORY_SEPARATOR, et language.
Référencé par lang().
|
protected |
Set the message type. PHPMailer only supports some preset message types, not arbitrary MIME structures. protected
Références $type, alternativeExists(), attachmentExists(), et inlineImageExists().
Référencé par preSend().
setWordWrap | ( | ) |
Apply word wrapping to the message body. Wraps the message body to the number of chars set in the WordWrap property. You should only do this to plain-text bodies as wrapping HTML tags may break them. This is called automatically by createBody(), so you don't need to call it yourself. public
Références wrapText().
Référencé par createBody().
sign | ( | $cert_filename, | |
$key_filename, | |||
$key_pass, | |||
$extracerts_filename = '' |
|||
) |
Set the public and private key files and password for S/MIME signing. public
string | $cert_filename | |
string | $key_filename | |
string | $key_pass | Password for private key |
string | $extracerts_filename | Optional path to chain certificate |
smtpClose | ( | ) |
smtpConnect | ( | $options = null | ) |
Initiate a connection to an SMTP server. Returns false if the operation failed.
array | $options | An array of options compatible with stream_context_create() SMTP public |
phpmailerException |
Références $Helo, $options, $Port, $prefix, $SMTPOptions, $SMTPSecure, edebug(), elseif, getSMTPInstance(), lang(), null, et serverHostname().
Référencé par smtpSend().
|
protected |
Send mail via SMTP. Returns false if there is a bad MAIL FROM, RCPT, or DATA input. Uses the PHPMailerSMTP class by default.
string | $header | The message headers |
string | $body | The message body |
phpmailerException | SMTP protected |
Références $From, $Sender, $to, doCallback(), lang(), setError(), smtpConnect(), et validateAddress().
Référencé par postSend().
textLine | ( | $value | ) |
Return a formatted mail line. public
string | $value |
Référencé par createBody(), getBoundary(), et getMailMIME().
utf8CharBoundary | ( | $encodedText, | |
$maxLength | |||
) |
Find the last character boundary prior to $maxLength in a utf-8 quoted-printable encoded string. Original written by Colin Brown. public
string | $encodedText | utf-8 QP text |
integer | $maxLength | Find the last character boundary prior to this length |
Références elseif.
Référencé par wrapText().
|
static |
Check that a string looks like an email address.
string | $address | The email address to check |
string | callable | $patternselect | A selector for the validation pattern to use :
|
public
Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains. 2009-2010 Michael Rushton Feel free to use and redistribute this code. But please keep this copyright notice. This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email)
Références elseif.
Référencé par addAnAddress(), mailSend(), parseAddresses(), preSend(), setFrom(), et smtpSend().
wrapText | ( | $message, | |
$length, | |||
$qp_mode = false |
|||
) |
Word-wrap message. For use with mailers that do not automatically perform wrapping and for quoted-printable encoded messages. Original written by philippe.
string | $message | The message to wrap |
integer | $length | The line length to wrap to |
boolean | $qp_mode | Whether to run in Quoted-Printable mode public |
Références $LE, $message, elseif, fixEOL(), et utf8CharBoundary().
Référencé par encodeHeader(), et setWordWrap().
$action_function = '' |
|
protected |
Référencé par getAllRecipientAddresses().
$AllowEmpty = false |
$AltBody = '' |
|
protected |
Référencé par attachAll(), attachmentExists(), getAttachments(), inlineImageExists(), et Mail\sendMail().
$AuthType = '' |
|
protected |
Référencé par Mail\addBcc(), clearBCCs(), doCallback(), getBccAddresses(), UsersModelMail\send(), et Mail\sendMail().
$Body = '' |
Référencé par msgHTML().
|
protected |
Référencé par attachAll(), endBoundary(), et getBoundary().
|
protected |
Référencé par Mail\addCc(), clearCCs(), doCallback(), getCcAddresses(), et Mail\sendMail().
$CharSet = 'iso-8859-1' |
Référencé par createBody(), et getBoundary().
$ConfirmReadingTo = '' |
$ContentType = 'text/plain' |
Référencé par getBoundary().
|
protected |
Référencé par getCustomHeaders().
$Debugoutput = 'echo' |
$DKIM_domain = '' |
$DKIM_identity = '' |
$DKIM_passphrase = '' |
$DKIM_private = '' |
$DKIM_private_string = '' |
$DKIM_selector = '' |
$do_verp = false |
$Encoding = '8bit' |
Référencé par createBody(), et getBoundary().
|
protected |
$ErrorInfo = '' |
|
protected |
Référencé par __construct(), et Mail\getInstance().
$From = 'root@localhost' |
Référencé par smtpSend().
$FromName = 'Root User' |
$Helo = '' |
Référencé par PHPMailerOAuth\smtpConnect(), et smtpConnect().
$Host = 'localhost' |
$Hostname = '' |
Référencé par serverHostname().
$Ical = '' |
|
protected |
Référencé par getTranslations().
|
protected |
Référencé par getLastMessageID().
$LE = "\n" |
Référencé par addrAppend(), attachAll(), base64EncodeWrapMB(), createBody(), encodeString(), endBoundary(), getBoundary(), getMailMIME(), headerLine(), textLine(), et wrapText().
$Mailer = 'mail' |
|
protected |
|
protected |
$MessageDate = '' |
$MessageID = '' |
Référencé par createHeader().
|
protected |
Référencé par getSentMIMEMessage().
|
protected |
Référencé par preSend().
$Password = '' |
$PluginDir = '' |
$Port = 25 |
Référencé par PHPMailerOAuth\smtpConnect(), et smtpConnect().
$Priority = null |
$Realm = '' |
|
protected |
Référencé par clearQueuedAddresses().
|
protected |
Référencé par getReplyToAddresses().
|
protected |
$ReturnPath = '' |
$Sender = '' |
Référencé par smtpSend().
$Sendmail = '/usr/sbin/sendmail' |
|
protected |
|
protected |
|
protected |
|
protected |
$SingleTo = false |
$SingleToArray = array() |
|
protected |
Référencé par getSMTPInstance().
$SMTPAuth = false |
$SMTPAutoTLS = true |
$SMTPDebug = 0 |
$SMTPKeepAlive = false |
$SMTPOptions = array() |
Référencé par smtpConnect().
$SMTPSecure = '' |
Référencé par PHPMailerOAuth\smtpConnect(), et smtpConnect().
$Subject = '' |
$Timeout = 300 |
|
protected |
Référencé par Mail\add(), clearAddresses(), DKIM_Add(), doCallback(), getToAddresses(), mailPassthru(), mailSend(), UsersModelMail\send(), et smtpSend().
|
protected |
Référencé par createBody().
$Username = '' |
$UseSendmailOptions = true |
|
static |
$Version = '5.2.28+joomla2' |
$WordWrap = 0 |
$Workstation = '' |
$XMailer = '' |
const CRLF = "\r\n" |
SMTP RFC standard line ending.
const MAX_LINE_LENGTH = 998 |
const STOP_CONTINUE = 1 |
Error severity: message, likely ok to continue processing.
const STOP_CRITICAL = 2 |
Error severity: message, plus full stop, critical error reached.
const STOP_MESSAGE = 0 |
Error severity: message only, continue processing.