MailinglistMessagePart A class to represent a piece of a email message. More...
Public Member Functions | |
headerRaw ($name) | |
headerRaw(). More... | |
header ($name) | |
header() More... | |
headerEmail ($name) | |
Return header parsed as an email address into an array with indexes email and name. More... | |
headerNoComments ($name) | |
addHeader ($header_name, $header_value) | |
Add a given header to the message, if header already exists, add as an array. More... | |
setHeader ($header_name, $header_value) | |
Set a header to a given value. More... | |
body () | |
Return the body of the message. More... | |
headers () | |
Return array of all headers. More... | |
__construct ($msg=NULL) | |
Build an message part. More... | |
parseHeaders () | |
parseHeaders() Converts the headers member from a single text string with the contents of the part (or message) headers to an associtive array of the headers. More... | |
parseBody () | |
parseBody()) converts text string in the body variable into a processed body For MIME type multipart, the body will become an array of the sections For MIME type message/rfc822, the body will become a MailingMessage object More... | |
parseEmailAddr ($addr) | |
Parse an Email address. More... | |
stripComments ($header) | |
logError ($str, $parm=array()) | |
logError() More... | |
Data Fields | |
$headers | |
An array of the headers of the message part Header name is the index to the array. More... | |
$body | |
The body of the message, if it is a multi-part then it is an array of the various multi-parts. More... | |
MailinglistMessagePart A class to represent a piece of a email message.
Definition at line 268 of file MailinglistMessage.class.php.
__construct | ( | $msg = NULL | ) |
Build an message part.
$msg | The data to build the message from. Expecting a string with the data to build the part |
Definition at line 402 of file MailinglistMessage.class.php.
References body(), headers(), parseBody(), and parseHeaders().
addHeader | ( | $header_name, | |
$header_value | |||
) |
Add a given header to the message, if header already exists, add as an array.
Definition at line 352 of file MailinglistMessage.class.php.
References headers().
Referenced by parseHeaders().
body | ( | ) |
Return the body of the message.
Definition at line 384 of file MailinglistMessage.class.php.
References $body.
Referenced by __construct(), and parseBody().
header | ( | $name | ) |
Retrieves a specifed header from the message, performing general conversions on the data. This presumes that we will not be parsing the header latter for atoms.
$name | String with the name of the header to get. |
Definition at line 307 of file MailinglistMessage.class.php.
References headerRaw(), and mailinglist_message_rfc2047().
Referenced by headerNoComments().
headerEmail | ( | $name | ) |
Return header parsed as an email address into an array with indexes email and name.
Definition at line 318 of file MailinglistMessage.class.php.
References headerRaw(), and parseEmailAddr().
headerNoComments | ( | $name | ) |
Definition at line 336 of file MailinglistMessage.class.php.
References header(), and stripComments().
headerRaw | ( | $name | ) |
Get raw header.
$name | String with the name of the header to get. |
Definition at line 290 of file MailinglistMessage.class.php.
References headers().
Referenced by header(), and headerEmail().
headers | ( | ) |
Return array of all headers.
Definition at line 391 of file MailinglistMessage.class.php.
References $headers.
Referenced by __construct(), addHeader(), headerRaw(), parseBody(), parseHeaders(), and setHeader().
logError | ( | $str, | |
$parm = array() |
|||
) |
Log a error
Definition at line 663 of file MailinglistMessage.class.php.
Referenced by parseBody(), and parseHeaders().
parseBody | ( | ) |
parseBody()) converts text string in the body variable into a processed body For MIME type multipart, the body will become an array of the sections For MIME type message/rfc822, the body will become a MailingMessage object
Process encoding, character sets to make data stored as UTF-8 Thus the encoding/character set do NOT represent what is in the buffer, but how the data was sent.
Notes: Content-Type: Text/plain multipart/mixed multipart/alternate multipart/digest charset= US-ASCII UTF-8 ISO-8859-#
Content-Transfer-Encoding: BASE64, Quoted-printable, 7bit, 8bit
Definition at line 525 of file MailinglistMessage.class.php.
References $body, body(), headers(), and logError().
Referenced by __construct().
parseEmailAddr | ( | $addr | ) |
Parse an Email address.
$addr | The email address to parse |
Definition at line 609 of file MailinglistMessage.class.php.
Referenced by headerEmail().
parseHeaders | ( | ) |
parseHeaders() Converts the headers member from a single text string with the contents of the part (or message) headers to an associtive array of the headers.
The index of the array is the Header name, and the value is the header value. If header was repeated, the value will be an array with each header as an element.
Definition at line 420 of file MailinglistMessage.class.php.
References $headers, addHeader(), headers(), and logError().
Referenced by __construct().
setHeader | ( | $header_name, | |
$header_value | |||
) |
Set a header to a given value.
Definition at line 377 of file MailinglistMessage.class.php.
References headers().
Referenced by MailinglistMessage\__construct().
stripComments | ( | $header | ) |
Definition at line 644 of file MailinglistMessage.class.php.
Referenced by headerNoComments().
$body |
The body of the message, if it is a multi-part then it is an array of the various multi-parts.
if it is a message/rfc822 part, then body will be a Mailinglist Message
Definition at line 280 of file MailinglistMessage.class.php.
Referenced by body(), and parseBody().
An array of the headers of the message part Header name is the index to the array.
If header occures multiple times, then entry is an array of the occurances of it.
Definition at line 273 of file MailinglistMessage.class.php.
Referenced by headers(), and parseHeaders().