Home | Trees | Indices | Help |
|
---|
|
object --+ | Message
Simple e-mail message class.
Message provides a means to easily create e-mail messages to be sent through the Dispatch mechanism or MailPool. Message provides various helper functions to correctly format plain text, dual plain text and rich text MIME encoded messages, as well as handle embedded and external attachments.
All properties can be set from the constructor.
Example usage:import turbomail message = turbomail.Message( "from@host.com", "to@host.com", "Subject", plain="This is a plain message." )E-mail addresses can be represented as any of the following:
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
tuple |
|
||
Inherited from |
|
|||
bool |
_dirty Has there been changes since the MIME message was last generated? |
||
bool |
_processed Has the MIME-encoded message been generated? |
||
list |
attachments A list of MIME-encoded attachments. |
||
bcc The BCC header. |
|||
cc The CC header. |
|||
string |
date The Date header. |
||
disposition The Disposition-Notification-To header. |
|||
list |
embedded A list of MIME-encoded embedded obejects for use in the text/html part. |
||
string |
encoding Content encoding. |
||
headers A list of additional headers. |
|||
string |
organization The Organization header. |
||
string |
plain The plain text content of the message. |
||
int |
priority The X-Priority header, a number ranging from 1-5. |
||
recipient The To header. |
|||
replyto The X-Reply-To header. |
|||
string |
rich The rich text (HTML) content of the message. |
||
sender The From header. |
|||
smtpfrom The envelope address, if different than the sender. |
|||
string |
subject The Subject header. |
|
|||
Inherited from |
|
Instantiate a new Message object. No arguments are required, as everything can be set using class properties. Alternatively, everything can be set using the constructor, using named arguments. The first three positional arguments can be used to quickly prepare a simple message. An instance of Message is callable.
|
|
Attach an on-disk image file and prepare for HTML embedding. This method should only be used to embed images.
|
Produce the final MIME message. Additinoally, if only a rich text part exits, strip the HTML to produce the plain text part. (This produces identical output as KID, although lacks reverse entity conversion -- &, etc.) |
|
|
|
bccThe BCC header. As per the recipient property. Optional. |
ccThe CC header. As per the recipient property. Optional. |
dateThe Date header. Must be correctly formatted.
|
dispositionThe Disposition-Notification-To header. A string or 2-tuple. Optional. |
encodingContent encoding. Pulled from mail.encoding, defaults to 'us-ascii'.
|
headersA list of additional headers. Can be added in a wide variety of formats: a list of strings, list of tuples, a dictionary, etc. Look at the code. |
organizationThe Organization header. Optional.
|
priorityThe X-Priority header, a number ranging from 1-5. Optional. Default: 3
|
recipientThe To header. A string, 2-tuple, or list of strings or 2-tuples. |
replytoThe X-Reply-To header. A string or 2-tuple. Optional. |
richThe rich text (HTML) content of the message. Plain text content must be available as well.
|
senderThe From header. A string or 2-tuple. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Tue Jul 24 11:43:53 2007 | http://epydoc.sourceforge.net |