|
eZ Publish
[4.2]
|
Mail handler. More...
Public Member Functions | |
| addBcc ($email, $name=false) | |
| addCc ($email, $name=false) | |
| addExtraHeader ($headerName, $headerValue) | |
| addReceiver ($email, $name=false) | |
| allowedCharsets () | |
| bccElements () | |
| bccReceiverTextList ($convert=true) | |
| body ($convert=true) | |
| ccElements () | |
| ccReceiverTextList ($convert=true) | |
| composeEmailItems ($items, $join=true, $key=false, $convert=true) | |
| composeEmailName ($item, $key=false, $convert=true) | |
| contentCharset () | |
| contentDisposition () | |
| contentTransferEncoding () | |
| contentType () | |
| convertHeaderText ($text) | |
| convertText ($text, $isHeader=false) | |
| encodeMimeHeader ($str) | |
| extraHeaders () | |
| eZMail () | |
| headers ($parameters=array()) | |
| headerText ($parameters=array()) | |
| headerTextList ($parameters=array()) | |
| isAllowedCharset ($charset) | |
| messageID () | |
| mimeVersion () | |
| outputCharset () | |
| receiverElements () | |
| receiverEmailText ($convert=true) | |
| receiverText ($convert=true) | |
| receiverTextList ($convert=true) | |
| references () | |
| replyTo ($convert=true) | |
| sender ($convert=true) | |
| senderText ($convert=true) | |
| setBccElements ($newBcc) | |
| setBody ($newBody) | |
| setCcElements ($newCc) | |
| setContentType ($type=false, $charset=false, $transferEncoding=false, $disposition=false, $boundary=false) | |
| setExtraHeader ($headerName, $headerValue) | |
| setExtraHeaders ($headers) | |
| setMessageID ($newMessageID) | |
| setMIMEVersion ($version) | |
| setReceiver ($email, $name=false) | |
| setReceiverElements ($toElements) | |
| setReceiverText ($text) | |
| setReferences ($newReference) | |
| setReplyTo ($email, $name=false) | |
| setSender ($email, $name=false) | |
| setSenderText ($text) | |
| setSubject ($newSubject) | |
| setUserAgent ($agent) | |
| subject ($convert=true) | |
| usedCharset () | |
| userAgent ($convert=true) | |
Static Public Member Functions | |
| static | blankNewlines ($text) |
| static | contentString ($content) |
| static | extractEmail ($text, &$email, &$name) |
| static | lineSeparator () |
| static & | splitList ($emails) |
| static | stripEmail ($address) |
| static | validate ($address) |
Public Attributes | |
| $BccElements | |
| $BodyText | |
| $CcElements | |
| $ContentType | |
| $ExtraHeaders | |
| $From | |
| $MessageID | |
| $ReceiverElements | |
| $ReplyTo | |
| $Subject | |
| $TextCodec | |
| $UserAgent | |
| const | REGEXP = '(((\"[^\"\f\n\r\t\v\b]+\")|([A-Za-z0-9_\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[A-Za-z0-9_\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]{2,})))' |
Mail handler.
Class for storing the details about en email and providing text serialization.
Definition at line 47 of file ezmail.php.
| eZMail::addBcc | ( | $ | email, |
| $ | name = false |
||
| ) |
Adds a new Bcc address.
Definition at line 376 of file ezmail.php.
| eZMail::addCc | ( | $ | email, |
| $ | name = false |
||
| ) |
Adds a new Cc address.
Definition at line 359 of file ezmail.php.
| eZMail::addExtraHeader | ( | $ | headerName, |
| $ | headerValue | ||
| ) |
Adds the headers $headerName with header value $headerValue to the extra headers.
Definition at line 393 of file ezmail.php.
Referenced by setExtraHeader().
| eZMail::addReceiver | ( | $ | email, |
| $ | name = false |
||
| ) |
Adds a new receiver address.
Definition at line 313 of file ezmail.php.
| eZMail::allowedCharsets | ( | ) |
Definition at line 871 of file ezmail.php.
Referenced by isAllowedCharset().
| eZMail::bccElements | ( | ) |
Returns the addresses which should get a blind carbon copy.
Definition at line 140 of file ezmail.php.
| eZMail::bccReceiverTextList | ( | $ | convert = true | ) |
Definition at line 108 of file ezmail.php.
Referenced by eZSMTPTransport\sendMail().
| static eZMail::blankNewlines | ( | $ | text | ) | [static] |
Definition at line 551 of file ezmail.php.
Referenced by headerText(), and headerTextList().
| eZMail::body | ( | $ | convert = true | ) |
returns the body.
Definition at line 480 of file ezmail.php.
Referenced by eZFileTransport\sendMail(), eZSMTPTransport\sendMail(), and eZSendmailTransport\sendMail().
| eZMail::ccElements | ( | ) |
Returns the addresses which should get a carbon copy.
Definition at line 132 of file ezmail.php.
| eZMail::ccReceiverTextList | ( | $ | convert = true | ) |
Returns the receiver cc addresses as an array with texts.
Definition at line 103 of file ezmail.php.
Referenced by eZSMTPTransport\sendMail().
| eZMail::composeEmailItems | ( | $ | items, |
| $ | join = true, |
||
| $ | key = false, |
||
| $ | convert = true |
||
| ) |
Composes an email text out of all items in $items and returns it. All items are comma separated.
Definition at line 594 of file ezmail.php.
Referenced by bccReceiverTextList(), ccReceiverTextList(), headers(), receiverEmailText(), receiverText(), and receiverTextList().
| eZMail::composeEmailName | ( | $ | item, |
| $ | key = false, |
||
| $ | convert = true |
||
| ) |
Composes a text out of the email and name and returns it.
Example: John Doe <john@doe.com> or just john@doe.com
Definition at line 574 of file ezmail.php.
Referenced by composeEmailItems(), headers(), and senderText().
| eZMail::contentCharset | ( | ) |
Definition at line 213 of file ezmail.php.
Referenced by convertHeaderText(), convertText(), encodeMimeHeader(), and usedCharset().
| eZMail::contentDisposition | ( | ) |
Definition at line 229 of file ezmail.php.
| static eZMail::contentString | ( | $ | content | ) | [static] |
Definition at line 561 of file ezmail.php.
Referenced by headerText(), and headerTextList().
| eZMail::contentTransferEncoding | ( | ) |
Definition at line 221 of file ezmail.php.
| eZMail::contentType | ( | ) |
Definition at line 204 of file ezmail.php.
| eZMail::convertHeaderText | ( | $ | text | ) |
Calls convertText with $isHeader set to true.
Definition at line 786 of file ezmail.php.
Referenced by composeEmailName(), replyTo(), sender(), senderText(), subject(), and userAgent().
| eZMail::convertText | ( | $ | text, |
| $ | isHeader = false |
||
| ) |
Converts the text $text to a suitable output format.
true. Definition at line 836 of file ezmail.php.
Referenced by body().
| eZMail::encodeMimeHeader | ( | $ | str | ) |
Encodes $str using mb_encode_mimeheader() if it is aviable, or does base64 encodin of a header if not.
Definition at line 800 of file ezmail.php.
Referenced by convertHeaderText().
| static eZMail::extractEmail | ( | $ | text, |
| &$ | email, | ||
| &$ | name | ||
| ) | [static] |
Definition at line 517 of file ezmail.php.
Referenced by eZSMTPTransport\sendMail(), setReceiverText(), and setSenderText().
| eZMail::extraHeaders | ( | ) |
Return the extra headers
Definition at line 385 of file ezmail.php.
| eZMail::eZMail | ( | ) |
Constructs a new eZMail object.
Definition at line 54 of file ezmail.php.
| eZMail::headers | ( | $ | parameters = array() | ) |
name and content. content will either be a string or an array with strings.The parameter $parameters contains optional parameters, they can be:
Array of header names which will not be included in the result array. Definition at line 618 of file ezmail.php.
Referenced by headerText(), and headerTextList().
| eZMail::headerText | ( | $ | parameters = array() | ) |
Composes a text field out of all the headers and returns it. The parameter $parameters will be passed to the headers() function.
Definition at line 764 of file ezmail.php.
Referenced by eZFileTransport\sendMail(), and eZSendmailTransport\sendMail().
| eZMail::headerTextList | ( | $ | parameters = array() | ) |
Extracts all headers and generates a text string out of it. The parameter $parameters will be passed to the headers() function.
Definition at line 743 of file ezmail.php.
Referenced by eZSMTPTransport\sendMail().
| eZMail::isAllowedCharset | ( | $ | charset | ) |
true if the charset $charset is allowed as output charset. Definition at line 855 of file ezmail.php.
Referenced by convertText(), and usedCharset().
| static eZMail::lineSeparator | ( | ) | [static] |
Definition at line 899 of file ezmail.php.
Referenced by encodeMimeHeader(), headerText(), and setBody().
| eZMail::messageID | ( | ) |
Returns the message ID format : <number@serverID> Read in the RFC's if you want to know more about it..
Definition at line 430 of file ezmail.php.
| eZMail::mimeVersion | ( | ) |
Definition at line 196 of file ezmail.php.
| eZMail::outputCharset | ( | ) |
Definition at line 892 of file ezmail.php.
Referenced by convertText(), encodeMimeHeader(), and usedCharset().
| eZMail::receiverElements | ( | ) |
Returns the receiver addresses.
Definition at line 124 of file ezmail.php.
| eZMail::receiverEmailText | ( | $ | convert = true | ) |
Returns the receiver addresses as text with only the email address.
Definition at line 87 of file ezmail.php.
Referenced by eZSendmailTransport\sendMail().
| eZMail::receiverText | ( | $ | convert = true | ) |
Returns the receiver addresses as text.
Definition at line 95 of file ezmail.php.
| eZMail::receiverTextList | ( | $ | convert = true | ) |
Returns the receiver addresses as an array with texts.
Definition at line 116 of file ezmail.php.
Referenced by eZSMTPTransport\sendMail().
| eZMail::references | ( | ) |
Returns the messageID that this message is a reply to.
Definition at line 446 of file ezmail.php.
| eZMail::replyTo | ( | $ | convert = true | ) |
Returns the receiver address.
Definition at line 149 of file ezmail.php.
| eZMail::sender | ( | $ | convert = true | ) |
Returns the sender address.
Definition at line 159 of file ezmail.php.
Referenced by eZFileTransport\sendMail(), eZSMTPTransport\sendMail(), and eZSendmailTransport\sendMail().
| eZMail::senderText | ( | $ | convert = true | ) |
Returns the sender address as text.
Definition at line 184 of file ezmail.php.
Referenced by eZSMTPTransport\sendMail().
| eZMail::setBccElements | ( | $ | newBcc | ) |
Sets the bcc addresses.
Definition at line 368 of file ezmail.php.
| eZMail::setBody | ( | $ | newBody | ) |
Sets the body.
Definition at line 490 of file ezmail.php.
| eZMail::setCcElements | ( | $ | newCc | ) |
Sets the cc addresses.
Definition at line 351 of file ezmail.php.
| eZMail::setContentType | ( | $ | type = false, |
| $ | charset = false, |
||
| $ | transferEncoding = false, |
||
| $ | disposition = false, |
||
| $ | boundary = false |
||
| ) |
Sets the various content variables, any parameter which is set to something other than false will overwrite the old value.
Definition at line 256 of file ezmail.php.
Referenced by eZMail().
| eZMail::setExtraHeader | ( | $ | headerName, |
| $ | headerValue | ||
| ) |
Similar to addExtraHeader() but will overwrite existing entries.
Definition at line 402 of file ezmail.php.
| eZMail::setExtraHeaders | ( | $ | headers | ) |
Sets the extra headers to $headers.
Definition at line 421 of file ezmail.php.
| eZMail::setMessageID | ( | $ | newMessageID | ) |
Sets the message ID. This is a server setting only so BE CAREFUL WITH THIS.
Definition at line 438 of file ezmail.php.
| eZMail::setMIMEVersion | ( | $ | version | ) |
Sets the MIME version to $version.
Definition at line 247 of file ezmail.php.
| eZMail::setReceiver | ( | $ | email, |
| $ | name = false |
||
| ) |
Sets the receiver address.
Definition at line 292 of file ezmail.php.
| eZMail::setReceiverElements | ( | $ | toElements | ) |
Sets the receiver addresses.
Definition at line 282 of file ezmail.php.
| eZMail::setReceiverText | ( | $ | text | ) |
Sets the receiver address, the email and name will be extracted from $text.
Definition at line 303 of file ezmail.php.
| eZMail::setReferences | ( | $ | newReference | ) |
Sets the messageID that this message is a reply to.
Definition at line 454 of file ezmail.php.
| eZMail::setReplyTo | ( | $ | email, |
| $ | name = false |
||
| ) |
Sets the receiver address.
Definition at line 323 of file ezmail.php.
| eZMail::setSender | ( | $ | email, |
| $ | name = false |
||
| ) |
Sets the sender address.
Definition at line 332 of file ezmail.php.
| eZMail::setSenderText | ( | $ | text | ) |
Sets the sender address, the email and name will be extracted from $text.
Definition at line 341 of file ezmail.php.
Referenced by eZFileTransport\sendMail(), eZSMTPTransport\sendMail(), and eZSendmailTransport\sendMail().
| eZMail::setSubject | ( | $ | newSubject | ) |
Sets the subject of the mail.
Definition at line 472 of file ezmail.php.
| eZMail::setUserAgent | ( | $ | agent | ) |
Sets the user agent for the email to $agent.
Definition at line 274 of file ezmail.php.
| static& eZMail::splitList | ( | $ | emails | ) | [static] |
Splits a list of email addresses into an array where each entry is an email address.
Definition at line 500 of file ezmail.php.
| static eZMail::stripEmail | ( | $ | address | ) | [static] |
Static function for extracting an e-mail from text
Returns the first valid e-mail in address, returns false if no e-mail addresses found
Definition at line 537 of file ezmail.php.
| eZMail::subject | ( | $ | convert = true | ) |
Returns the subject.
Definition at line 462 of file ezmail.php.
Referenced by headers(), and eZSendmailTransport\sendMail().
| eZMail::usedCharset | ( | ) |
Definition at line 881 of file ezmail.php.
Referenced by headers().
| eZMail::userAgent | ( | $ | convert = true | ) |
Definition at line 237 of file ezmail.php.
| static eZMail::validate | ( | $ | address | ) | [static] |
Static function for validating e-mail addresses.
Returns true if successful, false if not.
Definition at line 512 of file ezmail.php.
Referenced by eZUser\_loginUser(), eZSimplifiedXMLInputParser\publishHandlerLink(), eZSMTPTransport\sendMail(), eZFileTransport\sendMail(), eZSendmailTransport\sendMail(), and eZEmailType\validateEMailHTTPInput().
| eZMail::$BccElements |
Definition at line 933 of file ezmail.php.
| eZMail::$BodyText |
Definition at line 938 of file ezmail.php.
| eZMail::$CcElements |
Definition at line 932 of file ezmail.php.
| eZMail::$ContentType |
Definition at line 934 of file ezmail.php.
| eZMail::$ExtraHeaders |
Definition at line 939 of file ezmail.php.
| eZMail::$From |
Definition at line 931 of file ezmail.php.
| eZMail::$MessageID |
Definition at line 941 of file ezmail.php.
| eZMail::$ReceiverElements |
Definition at line 930 of file ezmail.php.
| eZMail::$ReplyTo |
Definition at line 936 of file ezmail.php.
| eZMail::$Subject |
Definition at line 937 of file ezmail.php.
| eZMail::$TextCodec |
Definition at line 940 of file ezmail.php.
| eZMail::$UserAgent |
Definition at line 935 of file ezmail.php.
| const eZMail::REGEXP = '(((\"[^\"\f\n\r\t\v\b]+\")|([A-Za-z0-9_\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[A-Za-z0-9_\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]{2,})))' |
Definition at line 49 of file ezmail.php.
Referenced by extractEmail(), stripEmail(), and validate().