Mstdlib-1.24.0
Email Message

Typedefs

typedef struct M_email M_email_t
 

Functions

M_email_tM_email_create (void)
 
void M_email_destroy (M_email_t *email)
 
M_bool M_email_set_headers (M_email_t *email, const M_hash_dict_t *headers)
 
M_bool M_email_headers_insert (M_email_t *email, const char *key, const char *val)
 
void M_email_headers_remove (M_email_t *email, const char *key)
 
const M_hash_dict_tM_email_headers (const M_email_t *email)
 
M_bool M_email_from (const M_email_t *email, char const **group, char const **name, char const **address)
 
char * M_email_from_field (const M_email_t *email)
 
void M_email_set_from (M_email_t *email, const char *group, const char *name, const char *address)
 
size_t M_email_to_len (const M_email_t *email)
 
M_bool M_email_to (const M_email_t *email, size_t idx, char const **group, char const **name, char const **address)
 
char * M_email_to_field (const M_email_t *email)
 
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)
 
void M_email_to_clear (M_email_t *email)
 
size_t M_email_cc_len (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)
 
char * M_email_cc_field (const M_email_t *email)
 
void M_email_cc_append (M_email_t *email, const char *group, const char *name, const char *address)
 
void M_email_cc_remove (M_email_t *email, size_t idx)
 
void M_email_cc_clear (M_email_t *email)
 
size_t M_email_bcc_len (const M_email_t *email)
 
M_bool M_email_bcc (const M_email_t *email, size_t idx, char const **group, char const **name, char const **address)
 
char * M_email_bcc_field (const M_email_t *email)
 
void M_email_bcc_append (M_email_t *email, const char *group, const char *name, const char *address)
 
void M_email_bcc_remove (M_email_t *email, size_t idx)
 
void M_email_bcc_clear (M_email_t *email)
 
void M_email_set_reply_to (M_email_t *email, const char *group, const char *name, const char *address)
 
char * M_email_reply_to_field (const M_email_t *email)
 
M_bool M_email_reply_to (const M_email_t *email, char const **group, char const **name, char const **address)
 
void M_email_reply_to_remove (M_email_t *email)
 
void M_email_set_subject (M_email_t *email, const char *subject)
 
const char * M_email_subject (const M_email_t *email)
 
void M_email_messageid (M_email_t *email, const char *prefix, const char *suffix)
 
void M_email_date (M_email_t *email, const char *format)
 
const char * M_email_preamble (const M_email_t *email)
 
void M_email_set_preamble (M_email_t *email, const char *data, size_t len)
 
const char * M_email_epilouge (const M_email_t *email)
 
void M_email_set_epilouge (M_email_t *email, const char *data, size_t len)
 
void M_email_set_mixed_multipart (M_email_t *email, M_bool is_mixed_multipart)
 
M_bool M_email_is_mixed_multipart (const M_email_t *email)
 
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)
 
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)
 
M_bool M_email_part_append_data (M_email_t *email, size_t idx, const char *data, size_t len)
 
M_bool M_email_part_set_data (M_email_t *email, size_t idx, const char *data, size_t len)
 
size_t M_email_parts_len (const M_email_t *email)
 
void M_email_parts_clear (M_email_t *email)
 
const char * M_email_part_data (const M_email_t *email, size_t idx)
 
const M_hash_dict_tM_email_part_headers (const M_email_t *email, size_t idx)
 
M_bool M_email_part_is_attachmenet (const M_email_t *email, size_t idx)
 
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_part_remove (M_email_t *email, size_t idx)
 

Detailed Description

Email Message.

Typedef Documentation

◆ M_email_t

typedef struct M_email M_email_t

Function Documentation

◆ M_email_create()

M_email_t * M_email_create ( void  )

Create an empty email email

return Message

◆ M_email_destroy()

void M_email_destroy ( M_email_t email)

◆ M_email_set_headers()

M_bool M_email_set_headers ( M_email_t email,
const M_hash_dict_t headers 
)

◆ M_email_headers_insert()

M_bool M_email_headers_insert ( M_email_t email,
const char *  key,
const char *  val 
)

◆ M_email_headers_remove()

void M_email_headers_remove ( M_email_t email,
const char *  key 
)

◆ M_email_headers()

const M_hash_dict_t * M_email_headers ( const M_email_t email)

◆ M_email_from()

M_bool M_email_from ( const M_email_t email,
char const **  group,
char const **  name,
char const **  address 
)

◆ M_email_from_field()

char * M_email_from_field ( const M_email_t email)

◆ M_email_set_from()

void M_email_set_from ( M_email_t email,
const char *  group,
const char *  name,
const char *  address 
)

◆ M_email_to_len()

size_t M_email_to_len ( const M_email_t email)

◆ M_email_to()

M_bool M_email_to ( const M_email_t email,
size_t  idx,
char const **  group,
char const **  name,
char const **  address 
)

◆ M_email_to_field()

char * M_email_to_field ( const M_email_t email)

◆ M_email_to_append()

void M_email_to_append ( M_email_t email,
const char *  group,
const char *  name,
const char *  address 
)

◆ M_email_to_remove()

void M_email_to_remove ( M_email_t email,
size_t  idx 
)

◆ M_email_to_clear()

void M_email_to_clear ( M_email_t email)

◆ M_email_cc_len()

size_t M_email_cc_len ( const M_email_t email)

◆ M_email_cc()

M_bool M_email_cc ( const M_email_t email,
size_t  idx,
char const **  group,
char const **  name,
char const **  address 
)

◆ M_email_cc_field()

char * M_email_cc_field ( const M_email_t email)

◆ M_email_cc_append()

void M_email_cc_append ( M_email_t email,
const char *  group,
const char *  name,
const char *  address 
)

◆ M_email_cc_remove()

void M_email_cc_remove ( M_email_t email,
size_t  idx 
)

◆ M_email_cc_clear()

void M_email_cc_clear ( M_email_t email)

◆ M_email_bcc_len()

size_t M_email_bcc_len ( const M_email_t email)

◆ M_email_bcc()

M_bool M_email_bcc ( const M_email_t email,
size_t  idx,
char const **  group,
char const **  name,
char const **  address 
)

◆ M_email_bcc_field()

char * M_email_bcc_field ( const M_email_t email)

◆ M_email_bcc_append()

void M_email_bcc_append ( M_email_t email,
const char *  group,
const char *  name,
const char *  address 
)

◆ M_email_bcc_remove()

void M_email_bcc_remove ( M_email_t email,
size_t  idx 
)

◆ M_email_bcc_clear()

void M_email_bcc_clear ( M_email_t email)

◆ M_email_set_reply_to()

void M_email_set_reply_to ( M_email_t email,
const char *  group,
const char *  name,
const char *  address 
)

◆ M_email_reply_to_field()

char * M_email_reply_to_field ( const M_email_t email)

◆ M_email_reply_to()

M_bool M_email_reply_to ( const M_email_t email,
char const **  group,
char const **  name,
char const **  address 
)

◆ M_email_reply_to_remove()

void M_email_reply_to_remove ( M_email_t email)

◆ M_email_set_subject()

void M_email_set_subject ( M_email_t email,
const char *  subject 
)

◆ M_email_subject()

const char * M_email_subject ( const M_email_t email)

◆ M_email_messageid()

void M_email_messageid ( M_email_t email,
const char *  prefix,
const char *  suffix 
)

Stamp email with randomized message id. That is, generate and assign to header "Message-ID".

Parameters
[in]emailThe email to stamp.
[in]prefixPrefix to id string
[in]suffixSuffix to id string

◆ M_email_date()

void M_email_date ( M_email_t email,
const char *  format 
)

Stamp email with date. That is, generate and assign to header "Date".

Parameters
[in]emailThe email to stamp.
[in]formatDate format string. NULL defaults to "%a, %d %b %Y %T %z"

◆ M_email_preamble()

const char * M_email_preamble ( const M_email_t email)

◆ M_email_set_preamble()

void M_email_set_preamble ( M_email_t email,
const char *  data,
size_t  len 
)

◆ M_email_epilouge()

const char * M_email_epilouge ( const M_email_t email)

◆ M_email_set_epilouge()

void M_email_set_epilouge ( M_email_t email,
const char *  data,
size_t  len 
)

◆ M_email_set_mixed_multipart()

void M_email_set_mixed_multipart ( M_email_t email,
M_bool  is_mixed_multipart 
)

◆ M_email_is_mixed_multipart()

M_bool M_email_is_mixed_multipart ( const M_email_t email)

◆ M_email_part_append()

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 
)

◆ M_email_part_append_attachment()

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 
)

◆ M_email_part_append_data()

M_bool M_email_part_append_data ( M_email_t email,
size_t  idx,
const char *  data,
size_t  len 
)

◆ M_email_part_set_data()

M_bool M_email_part_set_data ( M_email_t email,
size_t  idx,
const char *  data,
size_t  len 
)

◆ M_email_parts_len()

size_t M_email_parts_len ( const M_email_t email)

◆ M_email_parts_clear()

void M_email_parts_clear ( M_email_t email)

◆ M_email_part_data()

const char * M_email_part_data ( const M_email_t email,
size_t  idx 
)

◆ M_email_part_headers()

const M_hash_dict_t * M_email_part_headers ( const M_email_t email,
size_t  idx 
)

◆ M_email_part_is_attachmenet()

M_bool M_email_part_is_attachmenet ( const M_email_t email,
size_t  idx 
)

◆ M_email_part_attachment_info()

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 
)

◆ M_email_part_remove()

void M_email_part_remove ( M_email_t email,
size_t  idx 
)