29#include <mstdlib/base/m_defs.h>
30#include <mstdlib/base/m_types.h>
140M_API M_bool
M_email_to(
const M_email_t *email,
size_t idx,
char const **group,
char const **name,
char const **address);
149M_API M_bool
M_email_cc(
const M_email_t *email,
size_t idx,
char const **group,
char const **name,
char const **address);
158M_API M_bool
M_email_bcc(
const M_email_t *email,
size_t idx,
char const **group,
char const **name,
char const **address);
240struct M_email_reader;
struct M_buf M_buf_t
Definition: m_buf.h:77
M_email_error_t M_email_process_address(const char *val, M_email_error_t(*address_func)(const char *group, const char *name, const char *address, void *thunk), void *thunk)
char * M_email_write_single_recipient(const char *group, const char *name, const char *address)
M_bool M_email_headers_insert(M_email_t *email, const char *key, const char *val)
M_bool M_email_from(const M_email_t *email, char const **group, char const **name, char const **address)
void M_email_headers_remove(M_email_t *email, const char *key)
char * M_email_to_field(const M_email_t *email)
size_t M_email_to_len(const M_email_t *email)
void M_email_bcc_remove(M_email_t *email, size_t idx)
M_email_t * M_email_create(void)
M_bool M_email_reply_to(const M_email_t *email, char const **group, char const **name, char const **address)
void M_email_messageid(M_email_t *email, const char *prefix, const char *suffix)
char * M_email_bcc_field(const M_email_t *email)
void M_email_parts_clear(M_email_t *email)
void M_email_set_subject(M_email_t *email, const char *subject)
M_bool M_email_part_is_attachmenet(const M_email_t *email, size_t idx)
M_bool M_email_set_headers(M_email_t *email, const M_hash_dict_t *headers)
void M_email_to_append(M_email_t *email, const char *group, const char *name, const char *address)
void M_email_to_remove(M_email_t *email, size_t idx)
const char * M_email_subject(const M_email_t *email)
size_t M_email_bcc_len(const M_email_t *email)
char * M_email_cc_field(const M_email_t *email)
void M_email_set_from(M_email_t *email, const char *group, const char *name, const char *address)
const char * M_email_epilouge(const M_email_t *email)
void M_email_set_preamble(M_email_t *email, const char *data, size_t len)
M_bool M_email_is_mixed_multipart(const M_email_t *email)
void M_email_set_epilouge(M_email_t *email, const char *data, size_t len)
struct M_email M_email_t
Definition: m_email.h:109
const char * M_email_preamble(const M_email_t *email)
void M_email_set_reply_to(M_email_t *email, const char *group, const char *name, const char *address)
void M_email_part_remove(M_email_t *email, size_t idx)
M_bool M_email_part_set_data(M_email_t *email, size_t idx, const char *data, size_t len)
char * M_email_from_field(const M_email_t *email)
void M_email_cc_clear(M_email_t *email)
const M_hash_dict_t * M_email_part_headers(const M_email_t *email, size_t idx)
M_bool M_email_part_append(M_email_t *email, const char *data, size_t len, const M_hash_dict_t *headers, size_t *idx)
void M_email_to_clear(M_email_t *email)
char * M_email_reply_to_field(const M_email_t *email)
void M_email_set_mixed_multipart(M_email_t *email, M_bool is_mixed_multipart)
size_t M_email_cc_len(const M_email_t *email)
void M_email_bcc_clear(M_email_t *email)
size_t M_email_parts_len(const M_email_t *email)
void M_email_date(M_email_t *email, const char *format)
M_bool M_email_part_append_data(M_email_t *email, size_t idx, const char *data, size_t len)
const M_hash_dict_t * M_email_headers(const M_email_t *email)
M_bool M_email_cc(const M_email_t *email, size_t idx, char const **group, char const **name, char const **address)
M_bool M_email_to(const M_email_t *email, size_t idx, char const **group, char const **name, char const **address)
void M_email_bcc_append(M_email_t *email, const char *group, const char *name, const char *address)
void M_email_reply_to_remove(M_email_t *email)
void M_email_cc_remove(M_email_t *email, size_t idx)
M_bool M_email_part_append_attachment(M_email_t *email, const char *data, size_t len, const M_hash_dict_t *headers, const char *content_type, const char *transfer_encoding, const char *filename, size_t *idx)
void M_email_cc_append(M_email_t *email, const char *group, const char *name, const char *address)
const char * M_email_part_data(const M_email_t *email, size_t idx)
M_bool M_email_bcc(const M_email_t *email, size_t idx, char const **group, char const **name, char const **address)
M_bool M_email_part_attachment_info(const M_email_t *email, size_t idx, char const **content_type, char const **transfer_encoding, char const **filename)
void M_email_destroy(M_email_t *email)
M_email_reader_subject_func subject_func
Definition: m_email.h:538
M_email_reader_reply_to_func reply_to_func
Definition: m_email.h:537
M_email_reader_to_func to_func
Definition: m_email.h:533
M_email_reader_cc_func cc_func
Definition: m_email.h:535
M_email_reader_multipart_data_func multipart_data_func
Definition: m_email.h:546
M_email_reader_header_done_func header_done_func
Definition: m_email.h:539
M_email_reader_body_func body_func
Definition: m_email.h:540
M_email_reader_multipart_preamble_done_func multipart_preamble_done_func
Definition: m_email.h:542
M_email_reader_multipart_preamble_func multipart_preamble_func
Definition: m_email.h:541
M_email_reader_from_func from_func
Definition: m_email.h:534
M_email_reader_multipart_header_done_func multipart_header_done_func
Definition: m_email.h:545
M_email_reader_header_func header_func
Definition: m_email.h:532
M_email_reader_multipart_header_func multipart_header_func
Definition: m_email.h:543
M_email_reader_multipart_data_done_func multipart_data_done_func
Definition: m_email.h:547
M_email_reader_multipart_epilouge_func multipart_epilouge_func
Definition: m_email.h:549
M_email_reader_multipart_header_attachment_func multipart_header_attachment_func
Definition: m_email.h:544
M_email_reader_multipart_data_finished_func multipart_data_finished_func
Definition: m_email.h:548
M_email_reader_bcc_func bcc_func
Definition: m_email.h:536
M_email_error_t(* M_email_reader_header_func)(const char *key, const char *val, void *thunk)
Definition: m_email.h:269
M_email_reader_t * M_email_reader_create(struct M_email_reader_callbacks *cbs, M_uint32 flags, void *thunk)
M_email_error_t(* M_email_reader_to_func)(const char *group, const char *name, const char *address, void *thunk)
Definition: m_email.h:291
struct M_email_reader M_email_reader_t
Definition: m_email.h:241
M_email_error_t(* M_email_reader_multipart_data_finished_func)(void *thunk)
Definition: m_email.h:506
M_email_error_t(* M_email_reader_header_done_func)(M_email_data_format_t format, void *thunk)
Definition: m_email.h:391
M_email_error_t(* M_email_reader_multipart_data_func)(const char *data, size_t len, size_t idx, void *thunk)
Definition: m_email.h:485
M_email_error_t(* M_email_reader_cc_func)(const char *group, const char *name, const char *address, void *thunk)
Definition: m_email.h:331
M_email_reader_flags_t
Definition: m_email.h:525
M_email_error_t M_email_reader_read(M_email_reader_t *emailr, const char *data, size_t data_len, size_t *len_read)
M_email_error_t(* M_email_reader_multipart_header_func)(const char *key, const char *val, size_t idx, void *thunk)
Definition: m_email.h:447
M_email_error_t(* M_email_reader_multipart_preamble_done_func)(void *thunk)
Definition: m_email.h:426
void M_email_reader_destroy(M_email_reader_t *emailr)
M_email_error_t(* M_email_reader_multipart_header_attachment_func)(const char *content_type, const char *transfer_encoding, const char *filename, size_t idx, void *thunk)
Definition: m_email.h:463
M_email_error_t(* M_email_reader_subject_func)(const char *subject, void *thunk)
Definition: m_email.h:381
M_email_error_t(* M_email_reader_from_func)(const char *group, const char *name, const char *address, void *thunk)
Definition: m_email.h:309
M_email_error_t(* M_email_reader_multipart_preamble_func)(const char *data, size_t len, void *thunk)
Definition: m_email.h:415
M_email_error_t(* M_email_reader_body_func)(const char *data, size_t len, void *thunk)
Definition: m_email.h:402
M_email_error_t(* M_email_reader_bcc_func)(const char *group, const char *name, const char *address, void *thunk)
Definition: m_email.h:353
M_email_error_t(* M_email_reader_reply_to_func)(const char *group, const char *name, const char *address, void *thunk)
Definition: m_email.h:371
M_email_error_t(* M_email_reader_multipart_header_done_func)(size_t idx, void *thunk)
Definition: m_email.h:473
M_email_error_t(* M_email_reader_multipart_data_done_func)(size_t idx, void *thunk)
Definition: m_email.h:495
M_email_error_t(* M_email_reader_multipart_epilouge_func)(const char *data, size_t len, void *thunk)
Definition: m_email.h:519
@ M_EMAIL_READER_NONE
Definition: m_email.h:526
Definition: m_email.h:531
M_email_error_t M_email_simple_split_header_body(const char *message, M_hash_dict_t **headers, char **body)
M_email_error_t M_email_simple_read_parser(M_email_t **email, M_parser_t *parser, M_uint32 flags)
M_email_error_t M_email_simple_read(M_email_t **email, const char *data, size_t data_len, M_uint32 flags, size_t *len_read)
M_email_simple_read_flags_t
Definition: m_email.h:616
@ M_EMAIL_SIMPLE_READ_NONE
Definition: m_email.h:617
M_bool M_email_simple_write_buf(const M_email_t *email, M_buf_t *buf)
char * M_email_simple_write(const M_email_t *email)
M_email_data_format_t
Definition: m_email.h:91
M_email_error_t
Definition: m_email.h:75
@ M_EMAIL_DATA_FORMAT_MULTIPART
Definition: m_email.h:94
@ M_EMAIL_DATA_FORMAT_UNKNOWN
Definition: m_email.h:92
@ M_EMAIL_DATA_FORMAT_BODY
Definition: m_email.h:93
@ M_EMAIL_ERROR_MULTIPART_HEADER_INVALID
Definition: m_email.h:83
@ M_EMAIL_ERROR_MULTIPART_NOBOUNDARY
Definition: m_email.h:82
@ M_EMAIL_ERROR_INVALIDUSE
Definition: m_email.h:79
@ M_EMAIL_ERROR_HEADER_INVALID
Definition: m_email.h:80
@ M_EMAIL_ERROR_SUCCESS
Definition: m_email.h:76
@ M_EMAIL_ERROR_MOREDATA
Definition: m_email.h:77
@ M_EMAIL_ERROR_MULTIPART_MISSING_DATA
Definition: m_email.h:84
@ M_EMAIL_ERROR_NOT_EMAIL
Definition: m_email.h:86
@ M_EMAIL_ERROR_MULTIPART_INVALID
Definition: m_email.h:85
@ M_EMAIL_ERROR_USER_FAILURE
Definition: m_email.h:87
@ M_EMAIL_ERROR_ADDRESS
Definition: m_email.h:81
@ M_EMAIL_ERROR_STOP
Definition: m_email.h:78
struct M_hash_dict M_hash_dict_t
Definition: m_hash_dict.h:52
struct M_parser M_parser_t
Definition: m_parser.h:52