Camel.MimeMessage¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | Camel.MimePart (25), Camel.Medium (8), Camel.DataWrapper (31), GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new() | 
| build_mbox_from() | |
| dump(body) | |
| encode_8bit_parts() | |
| foreach_part(callback, *user_data) | |
| get_date() | |
| get_date_received() | |
| get_from() | |
| get_message_id() | |
| get_part_by_content_id(content_id) | |
| get_recipients(type) | |
| get_reply_to() | |
| get_source() | |
| get_subject() | |
| has_8bit_parts() | |
| has_attachment() | |
| set_best_encoding(required, enctype) | |
| set_date(date, offset) | |
| set_from(from_) | |
| set_message_id(message_id) | |
| set_recipients(type, recipients) | |
| set_reply_to(reply_to) | |
| set_source(source_uid) | |
| set_subject(subject) | 
Virtual Methods¶
| Inherited: | Camel.MimePart (1), Camel.Medium (8), Camel.DataWrapper (11), GObject.Object (7) | 
|---|
Properties¶
| Inherited: | Camel.MimePart (4), Camel.Medium (1) | 
|---|
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class Camel.MimeMessage(**kwargs)¶
- Bases: - Camel.MimePart- Abstract: - No - Structure: - Camel.MimeMessageClass- 
classmethod new()¶
- Returns: - a new - Camel.MimeMessageobject- Return type: - Camel.MimeMessage- Create a new - Camel.MimeMessageobject.
 - 
build_mbox_from()¶
- Returns: - an MBox from-line suitable for use in an mbox file - Return type: - str- Build an MBox from-line from self. 
 - 
dump(body)¶
- Parameters: - body ( - int) – whether to dump also message body- Dump information about the mime message to stdout. - If body is - True, then dump body content of the message as well.
 - 
encode_8bit_parts()¶
- Encode all message parts to a suitable transfer encoding for transport (7bit clean). 
 - 
foreach_part(callback, *user_data)¶
- Parameters: - callback (Camel.ForeachPartFuncorNone) – aCamel.ForeachPartFunccallback to call for eachCamel.part
- user_data (objectorNone) – user data passed to the callback
 - Calls callback for each - Camel.partof the self, including the message itself. The traverse of the self parts can be stopped when the callback returns- False.- New in version 3.34. 
- callback (
 - 
get_date()¶
- Returns: - the date of the message - offset: - output for the UTC offset - Return type: - ( - int, offset:- int)- Get the date and UTC offset of a message. See - Camel.MimeMessage.set_date() for information about the offset format.
 - 
get_date_received()¶
- Returns: - the received date of the message - offset: - output for the UTC offset - Return type: - ( - int, offset:- int)- Get the received date and UTC offset of a message. See - Camel.MimeMessage.set_date() for information about the offset format.
 - 
get_from()¶
- Returns: - the from address of the message - Return type: - Camel.InternetAddressor- None- Get the from address of a message. 
 - 
get_message_id()¶
- Returns: - the message-id of a message - Return type: - stror- None- Get the message-id of a message. 
 - 
get_part_by_content_id(content_id)¶
- Parameters: - content_id ( - str) – content-id to search for- Returns: - the MIME - Camel.partwith the requested id, or- Noneif not found- Return type: - Camel.MimePartor- None- Get a MIME - Camel.partby id from a message.
 - 
get_recipients(type)¶
- Parameters: - type ( - str) – recipient type- Returns: - the requested recipients - Return type: - Camel.InternetAddressor- None- Get the message recipients of a specified type. 
 - 
get_reply_to()¶
- Returns: - the Reply-To address of the message - Return type: - Camel.InternetAddressor- None- Get the Reply-To of a message. 
 - 
get_source()¶
- Returns: - the uid of the source account - Return type: - stror- None- Get the UID of the source account of the message. 
 - 
get_subject()¶
- Returns: - the message subject - Return type: - stror- None- Get the UTF-8 subject text of a message. 
 - 
has_8bit_parts()¶
- Returns: - Trueif the message contains 8bit parts or- Falseotherwise- Return type: - bool- Find out if a message contains 8bit or binary encoded parts. 
 - 
has_attachment()¶
- Return type: - bool- Returns whether message contains at least one attachment - Camel.part.- New in version 2.28. 
 - 
set_best_encoding(required, enctype)¶
- Parameters: - required (Camel.BestencRequired) – a bitwise ORing ofCamel.BestencRequired.GET_ENCODINGandCamel.BestencRequired.GET_CHARSET
- enctype (Camel.BestencEncoding) – an encoding to enforce
 - Re-encode all message parts to conform with the required encoding rules. - If enctype is - Camel.BestencEncoding._7BIT, then all parts will be re-encoded into one of the 7bit transfer encodings. If enctype is- Camel.BestencEncoding._8BIT, all parts will be re-encoded to either a 7bit encoding or, if the- Camel.partis 8bit text, allowed to stay 8bit. If enctype is- Camel.BestencEncoding.BINARY, then binary parts will be encoded as binary and 8bit textual parts will be encoded as 8bit.
- required (
 - 
set_date(date, offset)¶
- Parameters: - date (int) – a time_t date orCamel.MESSAGE_DATE_CURRENTto use the current local date and time
- offset (int) – an offset from UTC in decimal number using the +HHMM format (for instance an offset of -10:45 is -1045). If date set toCamel.MESSAGE_DATE_CURRENT, this parameter is ignored
 - Set the date on a message. - In most cases, this is used to set the current date: - camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0);
- date (
 - 
set_from(from_)¶
- Parameters: - from ( - Camel.InternetAddressor- None) – a- Camel.InternetAddressobject- Set the from address of a message. 
 - 
set_message_id(message_id)¶
- Parameters: - message_id ( - stror- None) – id of the message, or- Noneto generate a new one using the from address- Set the message-id on a message. 
 - 
set_recipients(type, recipients)¶
- Parameters: - type (str) – recipient type (one ofCamel.RECIPIENT_TYPE_TO,Camel.RECIPIENT_TYPE_CC, orCamel.RECIPIENT_TYPE_BCC)
- recipients (Camel.InternetAddressorNone) – aCamel.InternetAddresswith the recipient addresses set orNoneto remove the already defined one
 - Set the recipients of a message. 
- type (
 - 
set_reply_to(reply_to)¶
- Parameters: - reply_to ( - Camel.InternetAddressor- None) – a- Camel.InternetAddressobject- Set the Reply-To of a message. 
 
- 
classmethod