Part of lp.services.messages.model
Function | utcdatetime_from_field | Turn an RFC 2822 Date: header value into a Python datetime (UTC). |
Class | Message | A message. This is an RFC822-style message, typically it would be |
Function | get_parent_msgids | Returns a list of message ids the mail was a reply to. |
Class | MessageSet | No class docstring; 0/1 class methods, 3/4 methods documented |
Class | MessageChunk | One part of a possibly multipart Message |
Class | UserToUserEmail | See IUserToUserEmail . |
Class | DirectEmailAuthorization | See IDirectEmailAuthorization . |
Parameters | field_value | The value of the Date: header (type: string) |
Returns | The corresponding datetime (UTC) (type: datetime.datetime ) | |
Raises | InvalidEmailMessage | when the date string cannot be converted. |
Returns a list of message ids the mail was a reply to.
>>> get_parent_msgids({'In-Reply-To': '<msgid1>'}) ['<msgid1>']
>>> get_parent_msgids({'References': '<msgid1> <msgid2>'}) ['<msgid1>', '<msgid2>']
>>> get_parent_msgids({'In-Reply-To': '<msgid1> <msgid2>'}) ['<msgid1>', '<msgid2>']
>>> get_parent_msgids({'In-Reply-To': '', 'References': ''}) []
>>> get_parent_msgids({}) []