Documentation TYPO3 par Ameos

t3lib_readmail Class Reference

List of all members.

Public Member Functions

 find_MIDfromReturnPath ($to)
 find_XTypo3MID ($content)
 getMessage ($mailParts)
 getTextContent ($content)
 getMailBoundaryParts ($boundary, $content)
 getCType ($str)
 analyseReturnError ($c)
 decodeHeaderString ($str)
 extractNameEmail ($str)
 getContentTypeData ($contentTypeStr)
 makeUnixDate ($dateStr)
 getGMToffset ($GMT)
 extractMailHeader ($content, $limit=0)
 fullParse ($content)
 find_MIDfromReturnPath ($to)
 find_XTypo3MID ($content)
 getMessage ($mailParts)
 getTextContent ($content)
 getMailBoundaryParts ($boundary, $content)
 getCType ($str)
 analyseReturnError ($c)
 decodeHeaderString ($str)
 extractNameEmail ($str)
 getContentTypeData ($contentTypeStr)
 makeUnixDate ($dateStr)
 getGMToffset ($GMT)
 extractMailHeader ($content, $limit=0)
 fullParse ($content)

Public Attributes

 $dateAbbrevs
 $serverGMToffsetMinutes = 60

Detailed Description

Definition at line 87 of file class.t3lib_readmail.php.


Member Function Documentation

t3lib_readmail::analyseReturnError c  ) 
 

Analyses the return-mail content for the Dmailer module - used to find what reason there was for rejecting the mail Used by the Dmailer, but not exclusively.

Parameters:
string message body/text
Returns:
array key/value pairs with analysis result. Eg. "reason", "content", "reason_text", "mailserver" etc.

Definition at line 271 of file class.t3lib_readmail.php.

t3lib_readmail::analyseReturnError c  ) 
 

Analyses the return-mail content for the Dmailer module - used to find what reason there was for rejecting the mail Used by the Dmailer, but not exclusively.

Parameters:
string message body/text
Returns:
array key/value pairs with analysis result. Eg. "reason", "content", "reason_text", "mailserver" etc.

Definition at line 271 of file class.t3lib_readmail.php.

t3lib_readmail::decodeHeaderString str  ) 
 

Decodes a header-string with the =?....?= syntax including base64/quoted-printable encoding.

Parameters:
string A string (encoded or not) from a mail header, like sender name etc.
Returns:
string The input string, but with the parts in =?....?= decoded.

Definition at line 326 of file class.t3lib_readmail.php.

t3lib_readmail::decodeHeaderString str  ) 
 

Decodes a header-string with the =?....?= syntax including base64/quoted-printable encoding.

Parameters:
string A string (encoded or not) from a mail header, like sender name etc.
Returns:
string The input string, but with the parts in =?....?= decoded.

Definition at line 326 of file class.t3lib_readmail.php.

t3lib_readmail::extractMailHeader content,
limit = 0
 

This returns the mail header items in an array with associative keys and the mail body part in another CONTENT field

Parameters:
string Raw mail content
integer A safety limit that will put a upper length to how many header chars will be processed. Set to zero means that there is no limit. (Uses a simple substr() to limit the amount of mail data to process to avoid run-away)
Returns:
array An array where each key/value pair is a header-key/value pair. The mail BODY is returned in the key 'CONTENT' if $limit is not set!

Definition at line 443 of file class.t3lib_readmail.php.

t3lib_readmail::extractMailHeader content,
limit = 0
 

This returns the mail header items in an array with associative keys and the mail body part in another CONTENT field

Parameters:
string Raw mail content
integer A safety limit that will put a upper length to how many header chars will be processed. Set to zero means that there is no limit. (Uses a simple substr() to limit the amount of mail data to process to avoid run-away)
Returns:
array An array where each key/value pair is a header-key/value pair. The mail BODY is returned in the key 'CONTENT' if $limit is not set!

Definition at line 443 of file class.t3lib_readmail.php.

Referenced by getTextContent().

t3lib_readmail::extractNameEmail str  ) 
 

Extracts name/email parts from a header field (like 'To:' or 'From:' with name/email mixed up.

Parameters:
string Value from a header field containing name/email values.
Returns:
array Array with the name and email in. Email is validated, otherwise not set.

Definition at line 354 of file class.t3lib_readmail.php.

References t3lib_div::validEmail().

t3lib_readmail::extractNameEmail str  ) 
 

Extracts name/email parts from a header field (like 'To:' or 'From:' with name/email mixed up.

Parameters:
string Value from a header field containing name/email values.
Returns:
array Array with the name and email in. Email is validated, otherwise not set.

Definition at line 354 of file class.t3lib_readmail.php.

References t3lib_div::validEmail().

t3lib_readmail::find_MIDfromReturnPath to  ) 
 

Returns special TYPO3 Message ID (MID) from input TO header (the return address of the sent mail from Dmailer. Used by Dmailer, return mails)

Parameters:
string email address, return address string
Returns:
mixed array with 'mid', 'rtbl' and 'rid' keys are returned.

Definition at line 122 of file class.t3lib_readmail.php.

t3lib_readmail::find_MIDfromReturnPath to  ) 
 

Returns special TYPO3 Message ID (MID) from input TO header (the return address of the sent mail from Dmailer. Used by Dmailer, return mails)

Parameters:
string email address, return address string
Returns:
mixed array with 'mid', 'rtbl' and 'rid' keys are returned.

Definition at line 122 of file class.t3lib_readmail.php.

t3lib_readmail::find_XTypo3MID content  ) 
 

Returns special TYPO3 Message ID (MID) from input mail content (used by Dmailer, return mails)

Parameters:
string Mail (header) content
Returns:
mixed If "X-Typo3MID" header is found and integrity is OK, then an array with 'mid', 'rtbl' and 'rid' keys are returned. Otherwise void.

Definition at line 142 of file class.t3lib_readmail.php.

References t3lib_div::trimExplode().

t3lib_readmail::find_XTypo3MID content  ) 
 

Returns special TYPO3 Message ID (MID) from input mail content (used by Dmailer, return mails)

Parameters:
string Mail (header) content
Returns:
mixed If "X-Typo3MID" header is found and integrity is OK, then an array with 'mid', 'rtbl' and 'rid' keys are returned. Otherwise void.

Definition at line 142 of file class.t3lib_readmail.php.

References t3lib_div::trimExplode().

t3lib_readmail::fullParse content  ) 
 

The extended version of the extractMailHeader() which will also parse all the content body into an array and further process the header fields and decode content etc. Returns every part of the mail ready to go.

Parameters:
string Raw email input.
Returns:
array Multidimensional array with all parts of the message organized nicely. Use t3lib_div::debug() to analyse it visually.

Definition at line 474 of file class.t3lib_readmail.php.

t3lib_readmail::fullParse content  ) 
 

The extended version of the extractMailHeader() which will also parse all the content body into an array and further process the header fields and decode content etc. Returns every part of the mail ready to go.

Parameters:
string Raw email input.
Returns:
array Multidimensional array with all parts of the message organized nicely. Use t3lib_div::debug() to analyse it visually.

Definition at line 474 of file class.t3lib_readmail.php.

t3lib_readmail::getContentTypeData contentTypeStr  ) 
 

Returns the data from the 'content-type' field. That is the boundary, charset and mime-type

Parameters:
string "Content-type-string"
Returns:
array key/value pairs with the result.

Definition at line 383 of file class.t3lib_readmail.php.

t3lib_readmail::getContentTypeData contentTypeStr  ) 
 

Returns the data from the 'content-type' field. That is the boundary, charset and mime-type

Parameters:
string "Content-type-string"
Returns:
array key/value pairs with the result.

Definition at line 383 of file class.t3lib_readmail.php.

t3lib_readmail::getCType str  ) 
 

Returns Content Type plus more. Obsolete, use fullParse()

Parameters:
string "ContentType" string with more
Returns:
array parts in key/value pairs

Definition at line 248 of file class.t3lib_readmail.php.

t3lib_readmail::getCType str  ) 
 

Returns Content Type plus more. Obsolete, use fullParse()

Parameters:
string "ContentType" string with more
Returns:
array parts in key/value pairs

Definition at line 248 of file class.t3lib_readmail.php.

Referenced by getMessage().

t3lib_readmail::getGMToffset GMT  ) 
 

Parsing the GMT offset value from a mail timestamp.

Parameters:
string A string like "+0100" or so.
Returns:
integer Minutes to offset the timestamp private

Definition at line 429 of file class.t3lib_readmail.php.

t3lib_readmail::getGMToffset GMT  ) 
 

Parsing the GMT offset value from a mail timestamp.

Parameters:
string A string like "+0100" or so.
Returns:
integer Minutes to offset the timestamp private

Definition at line 429 of file class.t3lib_readmail.php.

t3lib_readmail::getMailBoundaryParts boundary,
content
 

Splits the body of a mail into parts based on the boundary string given. Obsolete, use fullParse()

Parameters:
string Boundary string used to split the content.
string BODY section of a mail
Returns:
array Parts of the mail based on this

Definition at line 228 of file class.t3lib_readmail.php.

t3lib_readmail::getMailBoundaryParts boundary,
content
 

Splits the body of a mail into parts based on the boundary string given. Obsolete, use fullParse()

Parameters:
string Boundary string used to split the content.
string BODY section of a mail
Returns:
array Parts of the mail based on this

Definition at line 228 of file class.t3lib_readmail.php.

Referenced by getMessage().

t3lib_readmail::getMessage mailParts  ) 
 

Returns the text content of a mail which has previously been parsed by eg. extractMailHeader() Probably obsolete since the function fullParse() is more advanced and safer to use.

Parameters:
array Output from extractMailHeader()
Returns:
string The content.

Definition at line 188 of file class.t3lib_readmail.php.

References getCType(), getMailBoundaryParts(), and getTextContent().

t3lib_readmail::getMessage mailParts  ) 
 

Returns the text content of a mail which has previously been parsed by eg. extractMailHeader() Probably obsolete since the function fullParse() is more advanced and safer to use.

Parameters:
array Output from extractMailHeader()
Returns:
string The content.

Definition at line 188 of file class.t3lib_readmail.php.

References getCType(), getMailBoundaryParts(), and getTextContent().

t3lib_readmail::getTextContent content  ) 
 

Returns the body part of a raw mail message (including headers) Probably obsolete since the function fullParse() is more advanced and safer to use.

Parameters:
string Raw mail content
Returns:
string Body of message

Definition at line 213 of file class.t3lib_readmail.php.

References extractMailHeader().

t3lib_readmail::getTextContent content  ) 
 

Returns the body part of a raw mail message (including headers) Probably obsolete since the function fullParse() is more advanced and safer to use.

Parameters:
string Raw mail content
Returns:
string Body of message

Definition at line 213 of file class.t3lib_readmail.php.

References extractMailHeader().

Referenced by getMessage().

t3lib_readmail::makeUnixDate dateStr  ) 
 

Makes a UNIX-date based on the timestamp in the 'Date' header field.

Parameters:
string String with a timestamp according to email standards.
Returns:
integer The timestamp converted to unix-time in seconds and compensated for GMT/CET ($this->serverGMToffsetMinutes);

Definition at line 406 of file class.t3lib_readmail.php.

t3lib_readmail::makeUnixDate dateStr  ) 
 

Makes a UNIX-date based on the timestamp in the 'Date' header field.

Parameters:
string String with a timestamp according to email standards.
Returns:
integer The timestamp converted to unix-time in seconds and compensated for GMT/CET ($this->serverGMToffsetMinutes);

Definition at line 406 of file class.t3lib_readmail.php.


Member Data Documentation

t3lib_readmail::$dateAbbrevs
 

Initial value:

 array(
                'JAN' => 1,
                'FEB' => 2,
                'MAR' => 3,
                'APR' => 4,
                'MAY' => 5,
                'JUN' => 6,
                'JUL' => 7,
                'AUG' => 8,
                'SEP' => 9,
                'OCT' => 10,
                'NOV' => 11,
                'DEC' => 12
        )

Definition at line 88 of file class.t3lib_readmail.php.


The documentation for this class was generated from the following files:


Généré par Le spécialiste TYPO3 avec  doxygen 1.4.6