|
enum | M_email_error_t {
M_EMAIL_ERROR_SUCCESS = 0
,
M_EMAIL_ERROR_MOREDATA
,
M_EMAIL_ERROR_STOP
,
M_EMAIL_ERROR_INVALIDUSE
,
M_EMAIL_ERROR_HEADER_INVALID
,
M_EMAIL_ERROR_ADDRESS
,
M_EMAIL_ERROR_MULTIPART_NOBOUNDARY
,
M_EMAIL_ERROR_MULTIPART_HEADER_INVALID
,
M_EMAIL_ERROR_MULTIPART_MISSING_DATA
,
M_EMAIL_ERROR_MULTIPART_INVALID
,
M_EMAIL_ERROR_NOT_EMAIL
,
M_EMAIL_ERROR_USER_FAILURE
} |
|
enum | M_email_data_format_t {
M_EMAIL_DATA_FORMAT_UNKNOWN = 0
,
M_EMAIL_DATA_FORMAT_BODY
,
M_EMAIL_DATA_FORMAT_MULTIPART
} |
|
- Warning
- incomplete and under active development
Email envelope reading and writing.
This is a flexible implementation and does not auto encode or decode. Also, only minimal data validation is performed. It is possible generate messages that are not standard compliant but it should not be possible to generate a email that with this module that cannot then be parsed by this module.
Conforms to:
- RFC 5322 Internet Message Format
Supported:
- RFC 6854 Update to Internet Message Format to Allow Group Syntax in the "From:" and "Sender:" Header Fields
Not supported:
- RFC 2047 MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text
- Splitting multipart within a multipart body part. The sub multipart will be returned as if it is all body data
There are two types of email parsing supported.
- Stream based callback
- Simple reader (memory buffered)
Currently supported Read:
Currently support Write:
◆ M_email_error_t
Error codes.
Enumerator |
---|
M_EMAIL_ERROR_SUCCESS | Success. Data fully parsed data is present. More data is possible because email does not have a length indicator. However, a complete email has been seen.
|
M_EMAIL_ERROR_MOREDATA | Incomplete email, more data required. Not necessarily an error if parsing as data is streaming.
|
M_EMAIL_ERROR_STOP | Stop processing (Used by callback functions to indicate non-error but stop processing).
|
M_EMAIL_ERROR_INVALIDUSE | Invalid use.
|
M_EMAIL_ERROR_HEADER_INVALID | Header is malformed.
|
M_EMAIL_ERROR_ADDRESS | Address is malformed.
|
M_EMAIL_ERROR_MULTIPART_NOBOUNDARY | Multipart email missing boundary.
|
M_EMAIL_ERROR_MULTIPART_HEADER_INVALID | Multipart email missing boundary.
|
M_EMAIL_ERROR_MULTIPART_MISSING_DATA | Multipart data missing.
|
M_EMAIL_ERROR_MULTIPART_INVALID | Multipart is invalid.
|
M_EMAIL_ERROR_NOT_EMAIL | Not an EMAIL email.
|
M_EMAIL_ERROR_USER_FAILURE | Generic callback generated failure.
|
◆ M_email_data_format_t
Email Content type.
Enumerator |
---|
M_EMAIL_DATA_FORMAT_UNKNOWN | |
M_EMAIL_DATA_FORMAT_BODY | Could not determine the format of the data. Body.
|
M_EMAIL_DATA_FORMAT_MULTIPART | Data is multipart.
|