Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
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='') | |
setFrom ($address, $name='', $auto=true) | |
getLastMessageID () | |
punyencodeAddress ($address) | |
send () | |
preSend () | |
postSend () | |
getSMTPInstance () | |
setSMTPInstance (SMTP $smtp) | |
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=self::ENCODING_BASE64, $type='', $disposition='attachment') | |
getAttachments () | |
encodeString ($str, $encoding=self::ENCODING_BASE64) | |
encodeHeader ($str, $position='text') | |
hasMultiBytes ($str) | |
has8bitChars ($text) | |
base64EncodeWrapMB ($str, $linebreak=null) | |
encodeQP ($string) | |
encodeQ ($str, $position='text') | |
addStringAttachment ( $string, $filename, $encoding=self::ENCODING_BASE64, $type='', $disposition='attachment') | |
addEmbeddedImage ( $path, $cid, $name='', $encoding=self::ENCODING_BASE64, $type='', $disposition='inline') | |
addStringEmbeddedImage ( $string, $cid, $name='', $encoding=self::ENCODING_BASE64, $type='', $disposition='inline') | |
inlineImageExists () | |
attachmentExists () | |
alternativeExists () | |
clearQueuedAddresses ($kind) | |
clearAddresses () | |
clearCCs () | |
clearBCCs () | |
clearReplyTos () | |
clearAllRecipients () | |
clearAttachments () | |
clearCustomHeaders () | |
isError () | |
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) | |
getToAddresses () | |
getCcAddresses () | |
getBccAddresses () | |
getReplyToAddresses () | |
getAllRecipientAddresses () | |
getOAuth () | |
setOAuth (OAuthTokenProvider $oauth) | |
Fonctions membres publiques statiques | |
static | parseAddresses ($addrstr, $useimap=true, $charset=self::CHARSET_ISO88591) |
static | validateAddress ($address, $patternselect=null) |
static | idnSupported () |
static | rfcDate () |
static | isValidHost ($host) |
static | _mime_types ($ext='') |
static | filenameToType ($filename) |
static | mb_pathinfo ($path, $options=null) |
static | normalizeBreaks ($text, $breaktype=null) |
static | stripTrailingWSP ($text) |
static | getLE () |
static | hasLineLongerThanMax ($str) |
static | quotedString ($str) |
Attributs publics statiques | |
static | $validator = 'php' |
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=self::ENCODING_BASE64) | |
validateEncoding ($encoding) | |
cidExists ($cid) | |
setError ($msg) | |
serverHostname () | |
lang ($key) | |
doCallback ($isSent, $to, $cc, $bcc, $subject, $body, $from, $extra) | |
Fonctions membres protégées statiques | |
static | isShellSafe ($string) |
static | isPermittedPath ($path) |
static | fileIsAccessible ($path) |
static | setLE ($le) |
Attributs protégés | |
$MIMEBody = '' | |
$MIMEHeader = '' | |
$mailHeader = '' | |
$oauth | |
$SingleToArray = [] | |
$smtp | |
$to = [] | |
$cc = [] | |
$bcc = [] | |
$ReplyTo = [] | |
$all_recipients = [] | |
$RecipientsQueue = [] | |
$ReplyToQueue = [] | |
$attachment = [] | |
$CustomHeader = [] | |
$lastMessageID = '' | |
$message_type = '' | |
$boundary = [] | |
$language = [] | |
$error_count = 0 | |
$sign_cert_file = '' | |
$sign_key_file = '' | |
$sign_extracerts_file = '' | |
$sign_key_pass = '' | |
$exceptions = false | |
$uniqueid = '' | |
Attributs protégés statiques | |
static | $IcalMethods |
static | $LE = self::CRLF |
Fonctions membres privées | |
mailPassthru ($to, $subject, $body, $header, $params) | |
getSmtpErrorMessage ($base_key) | |
__construct | ( | $exceptions = null | ) |
Constructor.
bool | $exceptions | Should we throw external exceptions? |
Références PHPMailer\$exceptions, et null.
__destruct | ( | ) |
Destructor.
Références PHPMailer\smtpClose().
|
static |
Get the MIME type for a file extension.
string | $ext | File extension |
addAddress | ( | $address, | |
$name = '' |
|||
) |
Add a "To" address.
string | $address | The email address to send to |
string | $name |
Exception |
Références $name, et PHPMailer\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 |
Exception |
Références $name, PHPMailer\edebug(), elseif, PHPMailer\lang(), et PHPMailer\setError().
addAttachment | ( | $path, | |
$name = '' , |
|||
$encoding = self::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 | MIME type, e.g. image/jpeg ; determined automatically from $path if not specified |
string | $disposition | Disposition to use |
Exception |
Références $name, $path, $type, PHPMailer\edebug(), PHPMailer\lang(), PHPMailer\setError(), et PHPMailer\validateEncoding().
addBCC | ( | $address, | |
$name = '' |
|||
) |
Add a "BCC" address.
string | $address | The email address to send to |
string | $name |
Exception |
Références $name, et PHPMailer\addOrEnqueueAnAddress().
addCC | ( | $address, | |
$name = '' |
|||
) |
Add a "CC" address.
string | $address | The email address to send to |
string | $name |
Exception |
Références $name, et PHPMailer\addOrEnqueueAnAddress().
addCustomHeader | ( | $name, | |
$value = null |
|||
) |
Add a custom header. $name value can be overloaded to contain both header name and value (name:value).
string | $name | Custom header name |
string | null | $value | Header value |
Exception |
Références $name, $value, PHPMailer\lang(), et null.
addEmbeddedImage | ( | $path, | |
$cid, | |||
$name = '' , |
|||
$encoding = self::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 |
Exception |
Références $name, $path, $type, PHPMailer\edebug(), PHPMailer\lang(), PHPMailer\setError(), et PHPMailer\validateEncoding().
Référencé par PHPMailer\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 |
Exception |
Références $name, $params, $this, PHPMailer\edebug(), elseif, PHPMailer\has8bitChars(), PHPMailer\lang(), et PHPMailer\setError().
Référencé par PHPMailer\addAddress(), PHPMailer\addBCC(), PHPMailer\addCC(), et PHPMailer\addReplyTo().
addrAppend | ( | $type, | |
$addr | |||
) |
Create recipient headers.
string | $type | |
array | $addr | An array of recipients, where each recipient is a 2-element indexed array with element 0 containing an address and element 1 containing a name, like: [['joe@e', 'Joe User'], [' xamp le.co mzoe@e', 'Zoe User']] xamp le.co m |
Références $type, et PHPMailer\addrFormat().
Référencé par PHPMailer\createHeader().
addReplyTo | ( | $address, | |
$name = '' |
|||
) |
Add a "Reply-To" address.
string | $address | The email address to reply to |
string | $name |
Exception |
Références $name, et PHPMailer\addOrEnqueueAnAddress().
addrFormat | ( | $addr | ) |
Format an address for use in a message header.
array | $addr | A 2-element indexed array, element 0 containing an address, element 1 containing a name like ['joe@e', 'Joe User'] xamp le.co m |
Références PHPMailer\encodeHeader(), et PHPMailer\secureHeader().
Référencé par PHPMailer\addrAppend(), PHPMailer\createHeader(), et PHPMailer\mailSend().
addStringAttachment | ( | $string, | |
$filename, | |||
$encoding = self::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 |
Exception |
Références $type, PHPMailer\edebug(), PHPMailer\lang(), PHPMailer\setError(), et PHPMailer\validateEncoding().
addStringEmbeddedImage | ( | $string, | |
$cid, | |||
$name = '' , |
|||
$encoding = self::ENCODING_BASE64 , |
|||
$type = '' , |
|||
$disposition = 'inline' |
|||
) |
Add an embedded stringified attachment. This can include images, sounds, and just about any other document type. If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type.
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 | A filename for the attachment. If this contains an extension, PHPMailer will attempt to set a MIME type for the attachment. For example 'file.jpg' would get an 'image/jpeg' MIME type. |
string | $encoding | File encoding (see $Encoding), defaults to 'base64' |
string | $type | MIME type - will be used in preference to any automatically derived type |
string | $disposition | Disposition to use |
Exception |
Références $name, $type, PHPMailer\edebug(), PHPMailer\lang(), PHPMailer\setError(), et PHPMailer\validateEncoding().
Référencé par PHPMailer\msgHTML().
alternativeExists | ( | ) |
Check if this message has an alternative body set.
Référencé par PHPMailer\msgHTML(), et PHPMailer\setMessageType().
|
protected |
Attach all file, string, and binary attachments to the message. Returns an empty string on failure.
string | $disposition_type | |
string | $boundary |
Exception |
Références PHPMailer\$attachment, PHPMailer\$boundary, $name, $path, $type, PHPMailer\encodeFile(), PHPMailer\encodeHeader(), PHPMailer\encodeString(), PHPMailer\isError(), et PHPMailer\secureHeader().
Référencé par PHPMailer\createBody().
attachmentExists | ( | ) |
Check if an attachment (non-inline) is present.
Références PHPMailer\$attachment.
Référencé par PHPMailer\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.
string | $str | multi-byte text to wrap encode |
string | $linebreak | string to use as linefeed/end-of-line |
Références $i, Joomla\Database\Query\$offset, $start, et null.
Référencé par PHPMailer\encodeHeader().
|
protected |
Check if an embedded attachment is present with this cid.
string | $cid |
Références PHPMailer\$attachment.
Référencé par PHPMailer\msgHTML().
clearAddresses | ( | ) |
Clear all To recipients.
Références PHPMailer\$to, et PHPMailer\clearQueuedAddresses().
clearAllRecipients | ( | ) |
Clear all recipient types.
clearAttachments | ( | ) |
Clear all filesystem, string, and binary attachments.
clearBCCs | ( | ) |
Clear all BCC recipients.
Références PHPMailer\$bcc, et PHPMailer\clearQueuedAddresses().
clearCCs | ( | ) |
Clear all CC recipients.
Références PHPMailer\$cc, et PHPMailer\clearQueuedAddresses().
clearCustomHeaders | ( | ) |
Clear all custom headers.
clearQueuedAddresses | ( | $kind | ) |
Clear queued addresses of given kind.
string | $kind | 'to', 'cc', or 'bcc' |
Références $params.
Référencé par PHPMailer\clearAddresses(), PHPMailer\clearBCCs(), et PHPMailer\clearCCs().
clearReplyTos | ( | ) |
Clear all ReplyTo recipients.
createBody | ( | ) |
Assemble the message body. Returns an empty string on failure.
Exception |
Références PHPMailer\$CharSet, PHPMailer\$Encoding, $method, $parts, PHPMailer\$uniqueid, PHPMailer\attachAll(), elseif, PHPMailer\encodeString(), PHPMailer\endBoundary(), PHPMailer\generateId(), PHPMailer\getBoundary(), PHPMailer\getMailMIME(), PHPMailer\has8bitChars(), PHPMailer\headerLine(), PHPMailer\isError(), PHPMailer\lang(), PHPMailer\setWordWrap(), et PHPMailer\textLine().
createHeader | ( | ) |
Assemble message headers.
Références $header, PHPMailer\$MessageID, $result, PHPMailer\addrAppend(), PHPMailer\addrFormat(), elseif, PHPMailer\encodeHeader(), PHPMailer\getMailMIME(), PHPMailer\headerLine(), null, PHPMailer\secureHeader(), et PHPMailer\serverHostname().
DKIM_Add | ( | $headers_line, | |
$subject, | |||
$body | |||
) |
Create the DKIM header and body in a new message header.
string | $headers_line | Header lines |
string | $subject | Subject |
string | $body | Body |
Exception |
Références $header, $subject, PHPMailer\DKIM_BodyC(), PHPMailer\DKIM_HeaderC(), PHPMailer\DKIM_QP(), PHPMailer\DKIM_Sign(), et elseif.
DKIM_BodyC | ( | $body | ) |
Generate a DKIM canonicalization body. Uses the 'simple' algorithm from RFC6376 section 3.4.3. Canonicalized bodies should always use CRLF, regardless of mailer setting.
string | $body | Message Body |
Référencé par PHPMailer\DKIM_Add().
DKIM_HeaderC | ( | $signHeader | ) |
Generate a DKIM canonicalization header. Uses the 'relaxed' algorithm from RFC6376 section 3.4.2. Canonicalized headers should always use CRLF, regardless of mailer setting.
string | $signHeader | Header |
Références $heading, $key, et $value.
Référencé par PHPMailer\DKIM_Add().
DKIM_QP | ( | $txt | ) |
Quoted-Printable-encode a DKIM header.
string | $txt |
Références $i.
Référencé par PHPMailer\DKIM_Add().
DKIM_Sign | ( | $signHeader | ) |
Generate a DKIM signature.
string | $signHeader |
Exception |
Références PHPMailer\lang().
Référencé par PHPMailer\DKIM_Add().
|
protected |
Perform a callback.
bool | $isSent | |
array | $to | |
array | $cc | |
array | $bcc | |
string | $subject | |
string | $body | |
string | $from | |
array | $extra |
Références PHPMailer\$bcc, PHPMailer\$cc, $subject, et PHPMailer\$to.
Référencé par PHPMailer\mailSend(), et PHPMailer\smtpSend().
|
protected |
Output debugging info via a user-defined method. Only generates output if debug output is enabled.
string | $str |
ForgottenDebugOutputInspection
Références ENT_QUOTES.
Référencé par PHPMailer\addAnAddress(), PHPMailer\addAttachment(), PHPMailer\addEmbeddedImage(), PHPMailer\addOrEnqueueAnAddress(), PHPMailer\addStringAttachment(), PHPMailer\addStringEmbeddedImage(), PHPMailer\encodeFile(), PHPMailer\mailPassthru(), et PHPMailer\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' |
Références $path, PHPMailer\edebug(), PHPMailer\encodeString(), PHPMailer\lang(), et PHPMailer\setError().
Référencé par PHPMailer\attachAll().
encodeHeader | ( | $str, | |
$position = 'text' |
|||
) |
Encode a header value (not including its label) optimally. Picks shortest of Q, B, or none. Result includes folding if needed. See RFC822 definitions for phrase, comment and text positions.
string | $str | The header value to encode |
string | $position | What context the string will be used in |
Références PHPMailer\$CharSet, $position, PHPMailer\base64EncodeWrapMB(), elseif, PHPMailer\encodeQ(), PHPMailer\has8bitChars(), PHPMailer\hasMultiBytes(), et PHPMailer\wrapText().
Référencé par PHPMailer\addrFormat(), PHPMailer\attachAll(), PHPMailer\createHeader(), et PHPMailer\mailPassthru().
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 |
Références $position.
Référencé par PHPMailer\encodeHeader().
encodeQP | ( | $string | ) |
Encode a string in quoted-printable format. According to RFC2045 section 6.7.
string | $string | The text to encode |
Référencé par PHPMailer\encodeString().
encodeString | ( | $str, | |
$encoding = self::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' |
Exception |
Références PHPMailer\encodeQP(), PHPMailer\lang(), et PHPMailer\setError().
Référencé par PHPMailer\attachAll(), PHPMailer\createBody(), et PHPMailer\encodeFile().
|
protected |
Return the end of a message boundary.
string | $boundary |
Références PHPMailer\$boundary.
Référencé par PHPMailer\createBody().
|
staticprotected |
Check whether a file path is safe, accessible, and readable.
string | $path | A relative or absolute path to a file |
Références $path.
|
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 |
|
protected |
Create a unique ID to use for boundaries.
CryptographicallySecureRandomnessInspection
Références elseif.
Référencé par PHPMailer\createBody().
getAllRecipientAddresses | ( | ) |
Allows for public read access to 'all_recipients' property. Before the send() call, queued addresses (i.e. with IDN) are not yet included.
Références PHPMailer\$all_recipients.
getAttachments | ( | ) |
getBccAddresses | ( | ) |
Allows for public read access to 'bcc' property. Before the send() call, queued addresses (i.e. with IDN) are not yet included.
Références PHPMailer\$bcc.
|
protected |
Return the start of a message boundary.
string | $boundary | |
string | $charSet | |
string | $contentType | |
string | $encoding |
Références PHPMailer\$boundary, PHPMailer\$CharSet, PHPMailer\$ContentType, PHPMailer\$Encoding, $result, PHPMailer\headerLine(), et PHPMailer\textLine().
Référencé par PHPMailer\createBody().
getCcAddresses | ( | ) |
Allows for public read access to 'cc' property. Before the send() call, queued addresses (i.e. with IDN) are not yet included.
Références PHPMailer\$cc.
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.
|
static |
Return the current line break format string.
getMailMIME | ( | ) |
Get the message MIME type headers.
Références $result, PHPMailer\headerLine(), et PHPMailer\textLine().
Référencé par PHPMailer\createBody(), et PHPMailer\createHeader().
getOAuth | ( | ) |
getReplyToAddresses | ( | ) |
Allows for public read access to 'ReplyTo' property. Before the send() call, queued addresses (i.e. with IDN) are not yet included.
Références PHPMailer\$ReplyTo.
getSentMIMEMessage | ( | ) |
Returns the whole MIME message. Includes complete headers and body. Only valid post preSend().
Références PHPMailer\$MIMEBody.
|
private |
Build an error message starting with a generic one and adding details if possible.
string | $base_key |
Références $message, et PHPMailer\lang().
Référencé par PHPMailer\smtpConnect().
getSMTPInstance | ( | ) |
Get an instance to use for SMTP operations. Override this function to load your own SMTP implementation, or set one with setSMTPInstance.
Références PHPMailer\$smtp.
Référencé par PHPMailer\smtpConnect().
getToAddresses | ( | ) |
Allows for public read access to 'to' property. Before the send() call, queued addresses (i.e. with IDN) are not yet included.
Références PHPMailer\$to.
getTranslations | ( | ) |
Get the array of strings for the current language.
Références PHPMailer\$language, language, et PHPMailer\setLanguage().
has8bitChars | ( | $text | ) |
Does a string contain any 8-bit chars (in any charset)?
string | $text |
Références $text.
Référencé par PHPMailer\addOrEnqueueAnAddress(), PHPMailer\createBody(), et PHPMailer\encodeHeader().
|
static |
Detect if a string contains a line longer than the maximum line length allowed by RFC 2822 section 2.1.1.
string | $str |
hasMultiBytes | ( | $str | ) |
Check if a string contains multi-byte characters.
string | $str | multi-byte text to wrap encode |
Référencé par PHPMailer\encodeHeader().
headerLine | ( | $name, | |
$value | |||
) |
Format a header line.
string | $name | |
string | int | $value |
Référencé par PHPMailer\createBody(), PHPMailer\createHeader(), PHPMailer\getBoundary(), et PHPMailer\getMailMIME().
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 removed for license reasons in #232. Example usage:
string | $html | The HTML text to convert |
bool | callable | $advanced | Any boolean value to use the internal converter, or provide your own callable for custom conversion. Never pass user-supplied data into this parameter |
Références $html, et ENT_QUOTES.
Référencé par PHPMailer\msgHTML().
|
static |
Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the intl
and mbstring
PHP extensions.
true
if required functions for IDN support are present inlineImageExists | ( | ) |
Check if an inline attachment is present.
Références PHPMailer\$attachment.
Référencé par PHPMailer\setMessageType().
isError | ( | ) |
Check if an error occurred.
Référencé par PHPMailer\attachAll(), et PHPMailer\createBody().
isHTML | ( | $isHtml = true | ) |
Sets message type to HTML or plain.
bool | $isHtml | True for HTML mode |
Référencé par PHPMailer\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 |
isSMTP | ( | ) |
Send messages using SMTP.
Référencé par Mail\useSmtp().
|
static |
Validate whether a string contains a valid value to use as a hostname or IP address. IPv6 addresses must include [], e.g. [::1]
, not just ::1
.
string | $host | The host name or IP address to check |
|
protected |
Get an error message in the current language.
string | $key |
Références $key, language, et PHPMailer\setLanguage().
Référencé par PHPMailer\addAnAddress(), PHPMailer\addAttachment(), PHPMailer\addCustomHeader(), PHPMailer\addEmbeddedImage(), PHPMailer\addOrEnqueueAnAddress(), PHPMailer\addStringAttachment(), PHPMailer\addStringEmbeddedImage(), PHPMailer\createBody(), PHPMailer\DKIM_Sign(), PHPMailer\encodeFile(), PHPMailer\encodeString(), PHPMailer\getSmtpErrorMessage(), PHPMailer\mailSend(), PHPMailer\set(), PHPMailer\setError(), PHPMailer\smtpConnect(), et PHPMailer\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 | null | $params | Params |
Références $header, $params, $result, $subject, PHPMailer\$to, PHPMailer\edebug(), PHPMailer\encodeHeader(), null, et PHPMailer\secureHeader().
Référencé par PHPMailer\mailSend().
|
protected |
Send mail using the PHP mail() function.
string | $header | The message headers |
string | $body | The message body |
Exception |
Références $header, $params, $result, PHPMailer\$to, PHPMailer\addrFormat(), PHPMailer\doCallback(), PHPMailer\lang(), PHPMailer\mailPassthru(), et null.
|
static |
Multi-byte-safe pathinfo replacement. Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe.
string | $path | A filename or path, does not need to exist as a file |
int | string | $options | Either a PATHINFO_* constant, or a string name to return only the specified piece |
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) Converts data-uri images into embedded attachments. If you don't want to apply these transformations to your HTML, just set Body and AltBody directly.
string | $message | HTML message string |
string | $basedir | Absolute path to a base directory to prepend to relative paths to images |
bool | callable | $advanced | Whether to use the internal HTML to text converter or your own custom converter |
Exception |
Références PHPMailer\$Body, $data, $images, $message, $url, PHPMailer\addEmbeddedImage(), PHPMailer\addStringEmbeddedImage(), PHPMailer\alternativeExists(), PHPMailer\cidExists(), elseif, PHPMailer\html2text(), et PHPMailer\isHTML().
|
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 static::$LE |
|
static |
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 |
string | $charset | The charset to use when decoding the address list string. |
postSend | ( | ) |
preSend | ( | ) |
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 |
|
static |
If a string contains any "special" characters, double-quote the name, and escape any double quotes with a backslash.
string | $str |
|
static |
Return an RFC 822 formatted date.
secureHeader | ( | $str | ) |
Strip newlines to prevent header injection.
string | $str |
Référencé par PHPMailer\addrFormat(), PHPMailer\attachAll(), PHPMailer\createHeader(), et PHPMailer\mailPassthru().
send | ( | ) |
Create a message and send it. Uses the sending method specified by $Mailer.
Exception |
|
protected |
Send mail using the $Sendmail program.
string | $header | The message headers |
string | $body | The message body |
Exception |
Références $header.
|
protected |
Get the server hostname. Returns 'localhost.localdomain' if unknown.
Références PHPMailer\$Hostname, $result, et elseif.
Référencé par PHPMailer\createHeader(), et PHPMailer\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’, static::ENCRYPTION_STARTTLS);` is the same as: $mail->SMTPSecure = static::ENCRYPTION_STARTTLS;
.
string | $name | The property name to set |
mixed | $value | The value to set the property to |
Références $name, $this, $value, PHPMailer\lang(), et PHPMailer\setError().
|
protected |
Add an error message to the error container.
string | $msg |
Références PHPMailer\$error_count, PHPMailer\lang(), et null.
Référencé par PHPMailer\addAnAddress(), PHPMailer\addAttachment(), PHPMailer\addEmbeddedImage(), PHPMailer\addOrEnqueueAnAddress(), PHPMailer\addStringAttachment(), PHPMailer\addStringEmbeddedImage(), PHPMailer\encodeFile(), PHPMailer\encodeString(), PHPMailer\set(), et PHPMailer\smtpSend().
setFrom | ( | $address, | |
$name = '' , |
|||
$auto = true |
|||
) |
Set the From and FromName properties.
string | $address | |
string | $name | |
bool | $auto | Whether to also set the Sender address, defaults to true |
Exception |
Référencé par Mail\setSender().
setLanguage | ( | $langcode = 'en' , |
|
$lang_path = '' |
|||
) |
Set the language for error messages. The default language is English.
string | $langcode | ISO 639-1 2-character language code (e.g. French is "fr") Optionally, the language code can be enhanced with a 4-character script annotation and/or a 2-character country annotation. |
string | $lang_path | Path to the language file directory, with trailing separator (slash) Do not set this from user input! |
Références $PHPMAILER_LANG, __DIR__, et language.
Référencé par PHPMailer\getTranslations(), et PHPMailer\lang().
|
staticprotected |
Set the line break format string, e.g. "\r\n".
string | $le |
|
protected |
Set the message type. PHPMailer only supports some preset message types, not arbitrary MIME structures.
Références $type, PHPMailer\alternativeExists(), PHPMailer\attachmentExists(), et PHPMailer\inlineImageExists().
setOAuth | ( | OAuthTokenProvider | $oauth | ) |
Set an OAuthTokenProvider instance.
Références PHPMailer\$oauth.
setSMTPInstance | ( | SMTP | $smtp | ) |
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.
Références PHPMailer\wrapText().
Référencé par PHPMailer\createBody().
sign | ( | $cert_filename, | |
$key_filename, | |||
$key_pass, | |||
$extracerts_filename = '' |
|||
) |
Set the public and private key files and password for S/MIME signing.
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() |
Exception |
Références PHPMailer\$Helo, $message, $options, PHPMailer\$Port, $prefix, PHPMailer\$SMTPOptions, PHPMailer\$SMTPSecure, $this, PHPMailer\edebug(), elseif, PHPMailer\getSmtpErrorMessage(), PHPMailer\getSMTPInstance(), PHPMailer\lang(), null, et PHPMailer\serverHostname().
Référencé par PHPMailer\smtpSend().
|
protected |
Send mail via SMTP. Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
string | $header | The message headers |
string | $body | The message body |
Exception |
Références PHPMailer\$From, $header, PHPMailer\$Sender, $this, PHPMailer\$to, PHPMailer\doCallback(), PHPMailer\lang(), PHPMailer\setError(), et PHPMailer\smtpConnect().
|
static |
Remove trailing breaks from a string.
string | $text |
Références $text.
textLine | ( | $value | ) |
Return a formatted mail line.
string | $value |
Références $value.
Référencé par PHPMailer\createBody(), PHPMailer\getBoundary(), et PHPMailer\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.
string | $encodedText | utf-8 QP text |
int | $maxLength | Find the last character boundary prior to this length |
Références elseif.
Référencé par PHPMailer\wrapText().
|
static |
Check that a string looks like an email address. Validation patterns supported:
auto
Pick best pattern automatically;pcre8
Use the squiloople.com pattern, requires PCRE > 8.0;pcre
Use old PCRE implementation;php
Use PHP built-in FILTER_VALIDATE_EMAIL;html5
Use the pattern given by the HTML5 spec for 'email' type form input elements.noregex
Don't use a regex: super fast, really dumb. Alternatively you may pass in a callable to inject your own validator, for example:You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator.
string | $address | The email address to check |
string | callable | $patternselect | Which pattern to use |
|
protected |
Validate encodings.
string | $encoding |
Référencé par PHPMailer\addAttachment(), PHPMailer\addEmbeddedImage(), PHPMailer\addStringAttachment(), et PHPMailer\addStringEmbeddedImage().
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 |
int | $length | The line length to wrap to |
bool | $qp_mode | Whether to run in Quoted-Printable mode |
Références $message, elseif, et PHPMailer\utf8CharBoundary().
Référencé par PHPMailer\encodeHeader(), et PHPMailer\setWordWrap().
$action_function = '' |
|
protected |
Référencé par PHPMailer\getAllRecipientAddresses().
$AllowEmpty = false |
$AltBody = '' |
|
protected |
$AuthType = '' |
|
protected |
Référencé par Mail\addBcc(), PHPMailer\clearBCCs(), PHPMailer\doCallback(), PHPMailer\getBccAddresses(), et Mail\sendMail().
$Body = '' |
Référencé par PHPMailer\msgHTML().
|
protected |
Référencé par PHPMailer\attachAll(), PHPMailer\endBoundary(), et PHPMailer\getBoundary().
|
protected |
Référencé par Mail\addCc(), PHPMailer\clearCCs(), PHPMailer\doCallback(), PHPMailer\getCcAddresses(), et Mail\sendMail().
$CharSet = self::CHARSET_ISO88591 |
Référencé par PHPMailer\createBody(), PHPMailer\encodeHeader(), et PHPMailer\getBoundary().
$ConfirmReadingTo = '' |
$ContentType = self::CONTENT_TYPE_PLAINTEXT |
Référencé par PHPMailer\getBoundary().
|
protected |
Référencé par PHPMailer\getCustomHeaders().
$Debugoutput = 'echo' |
$DKIM_copyHeaderFields = true |
$DKIM_domain = '' |
$DKIM_extraHeaders = [] |
$DKIM_identity = '' |
$DKIM_passphrase = '' |
$DKIM_private = '' |
$DKIM_private_string = '' |
$DKIM_selector = '' |
$do_verp = false |
$dsn = '' |
Comma separated list of DSN notifications 'NEVER' under no circumstances a DSN must be returned to the sender. If you use NEVER all other notifications will be ignored. 'SUCCESS' will notify you when your mail has arrived at its destination. 'FAILURE' will arrive if an error occurred during delivery. 'DELAY' will notify you if there is an unusual delay in delivery, but the actual delivery's outcome (success or failure) is not yet decided.
$Encoding = self::ENCODING_8BIT |
Référencé par PHPMailer\createBody(), et PHPMailer\getBoundary().
|
protected |
Référencé par PHPMailer\setError().
$ErrorInfo = '' |
|
protected |
Référencé par PHPMailer\__construct(), et Mail\getInstance().
$From = '' |
Référencé par PHPMailer\smtpSend().
$FromName = '' |
$Helo = '' |
Référencé par PHPMailer\smtpConnect().
$Host = 'localhost' |
$Hostname = '' |
Référencé par PHPMailer\serverHostname().
$Ical = '' |
|
staticprotected |
|
protected |
Référencé par MailTemplate\__construct(), MailTemplate\getTemplate(), et PHPMailer\getTranslations().
|
protected |
|
staticprotected |
$Mailer = 'mail' |
|
protected |
|
protected |
$MessageDate = '' |
$MessageID = '' |
Référencé par PHPMailer\createHeader().
|
protected |
Référencé par PHPMailer\getSentMIMEMessage().
|
protected |
|
protected |
Référencé par PHPMailer\getOAuth(), et PHPMailer\setOAuth().
$Password = '' |
$Port = 25 |
Référencé par PHPMailer\smtpConnect().
$Priority |
|
protected |
|
protected |
Référencé par PHPMailer\getReplyToAddresses().
|
protected |
$Sender = '' |
Référencé par PHPMailer\smtpSend().
$Sendmail = '/usr/sbin/sendmail' |
|
protected |
|
protected |
|
protected |
|
protected |
$SingleTo = false |
|
protected |
|
protected |
Référencé par PHPMailer\getSMTPInstance(), et PHPMailer\setSMTPInstance().
$SMTPAuth = false |
$SMTPAutoTLS = true |
$SMTPDebug = 0 |
$SMTPKeepAlive = false |
$SMTPOptions = [] |
Référencé par PHPMailer\smtpConnect().
$SMTPSecure = '' |
Référencé par PHPMailer\smtpConnect().
$Subject = '' |
$Timeout = 300 |
|
protected |
|
protected |
Référencé par PHPMailer\createBody().
$Username = '' |
$UseSendmailOptions = true |
|
static |
$WordWrap = 0 |
$XMailer = '' |
const CHARSET_ASCII = 'us-ascii' |
const CHARSET_ISO88591 = 'iso-8859-1' |
const CHARSET_UTF8 = 'utf-8' |
const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative' |
const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed' |
const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related' |
const CONTENT_TYPE_PLAINTEXT = 'text/plain' |
const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar' |
const CONTENT_TYPE_TEXT_HTML = 'text/html' |
const CRLF = "\r\n" |
The SMTP standard CRLF line break. If you want to change line break format, change static::$LE, not this.
const ENCODING_7BIT = '7bit' |
const ENCODING_8BIT = '8bit' |
const ENCODING_BASE64 = 'base64' |
const ENCODING_BINARY = 'binary' |
const ENCODING_QUOTED_PRINTABLE = 'quoted-printable' |
const ENCRYPTION_SMTPS = 'ssl' |
const ENCRYPTION_STARTTLS = 'tls' |
const FWS = ' ' |
"Folding White Space" a white space string used for line folding.
const ICAL_METHOD_ADD = 'ADD' |
const ICAL_METHOD_CANCEL = 'CANCEL' |
const ICAL_METHOD_COUNTER = 'COUNTER' |
const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER' |
const ICAL_METHOD_PUBLISH = 'PUBLISH' |
const ICAL_METHOD_REFRESH = 'REFRESH' |
const ICAL_METHOD_REPLY = 'REPLY' |
const ICAL_METHOD_REQUEST = 'REQUEST' |
const MAIL_MAX_LINE_LENGTH = 63 |
const MAX_LINE_LENGTH = 998 |
const STD_LINE_LENGTH = 76 |
const STOP_CONTINUE = 1 |
const STOP_CRITICAL = 2 |
const STOP_MESSAGE = 0 |
const VERSION = '6.6.0' |