24#ifndef __M_NET_SMTP_H__
25#define __M_NET_SMTP_H__
29#include <mstdlib/mstdlib.h>
30#include <mstdlib/mstdlib_io.h>
31#include <mstdlib/mstdlib_formats.h>
32#include <mstdlib/mstdlib_tls.h>
140typedef M_uint64 (*
M_net_smtp_process_fail_cb)(
const char *command,
int result_code,
const char *proc_stdout,
const char *proc_stderror,
void *thunk);
struct M_dns M_dns_t
Definition: m_dns.h:43
struct M_email M_email_t
Definition: m_email.h:109
struct M_event M_event_t
Definition: m_event.h:210
struct M_hash_dict M_hash_dict_t
Definition: m_hash_dict.h:52
struct M_io M_io_t
Definition: m_io.h:59
struct M_list_str M_list_str_t
Definition: m_list_str.h:80
M_net_error_t
Definition: m_net.h:44
M_net_smtp_connect_fail_cb connect_fail_cb
Definition: m_net_smtp.h:217
M_net_smtp_iocreate_cb iocreate_cb
Definition: m_net_smtp.h:224
M_net_smtp_sent_cb sent_cb
Definition: m_net_smtp.h:221
M_net_smtp_process_fail_cb process_fail_cb
Definition: m_net_smtp.h:219
M_net_smtp_reschedule_cb reschedule_cb
Definition: m_net_smtp.h:223
M_net_smtp_connect_cb connect_cb
Definition: m_net_smtp.h:216
M_net_smtp_disconnect_cb disconnect_cb
Definition: m_net_smtp.h:218
M_net_smtp_processing_halted_cb processing_halted_cb
Definition: m_net_smtp.h:220
M_net_smtp_send_failed_cb send_failed_cb
Definition: m_net_smtp.h:222
M_net_smtp_status_t M_net_smtp_status(const M_net_smtp_t *sp)
M_bool(* M_net_smtp_send_failed_cb)(const M_hash_dict_t *headers, const char *error, size_t attempt_num, M_bool can_requeue, void *thunk)
Definition: m_net_smtp.h:179
void M_net_smtp_setup_tcp(M_net_smtp_t *sp, M_dns_t *dns, M_tls_clientctx_t *ctx)
M_bool M_net_smtp_load_balance(M_net_smtp_t *sp, M_net_smtp_load_balance_t mode)
M_uint64(* M_net_smtp_process_fail_cb)(const char *command, int result_code, const char *proc_stdout, const char *proc_stderror, void *thunk)
Definition: m_net_smtp.h:140
M_bool M_net_smtp_queue_smtp(M_net_smtp_t *sp, const M_email_t *e)
void M_net_smtp_external_queue_have_messages(M_net_smtp_t *sp)
M_net_smtp_load_balance_t
Definition: m_net_smtp.h:70
M_bool(* M_net_smtp_iocreate_cb)(M_io_t *io, char *error, size_t errlen, void *thunk)
Definition: m_net_smtp.h:209
void M_net_smtp_set_stall_retries(M_net_smtp_t *sp, size_t num)
M_bool M_net_smtp_add_endpoint_tcp(M_net_smtp_t *sp, const char *address, M_uint16 port, M_bool connect_tls, const char *username, const char *password, size_t max_conns)
M_uint64(* M_net_smtp_processing_halted_cb)(M_bool no_endpoints, void *thunk)
Definition: m_net_smtp.h:152
M_uint64(* M_net_smtp_connect_fail_cb)(const char *address, M_uint16 port, M_net_error_t net_err, const char *error, void *thunk)
Definition: m_net_smtp.h:108
M_net_smtp_status_t
Definition: m_net_smtp.h:58
void M_net_smtp_setup_tcp_timeouts(M_net_smtp_t *sp, M_uint64 connect_ms, M_uint64 stall_ms, M_uint64 idle_ms)
M_list_str_t * M_net_smtp_dump_queue(M_net_smtp_t *sp)
void(* M_net_smtp_connect_cb)(const char *address, M_uint16 port, void *thunk)
Definition: m_net_smtp.h:89
void M_net_smtp_destroy(M_net_smtp_t *sp)
void(* M_net_smtp_disconnect_cb)(const char *address, M_uint16 port, void *thunk)
Definition: m_net_smtp.h:124
M_bool M_net_smtp_resume(M_net_smtp_t *sp)
void M_net_smtp_pause(M_net_smtp_t *sp)
M_bool M_net_smtp_use_external_queue(M_net_smtp_t *sp, char *(*get_cb)(void))
void M_net_smtp_set_num_attempts(M_net_smtp_t *sp, size_t num)
M_net_smtp_t * M_net_smtp_create(M_event_t *el, const struct M_net_smtp_callbacks *cbs, void *thunk)
M_bool M_net_smtp_add_endpoint_process(M_net_smtp_t *sp, const char *command, const M_list_str_t *args, const M_hash_dict_t *env, M_uint64 timeout_ms, size_t max_processes)
struct M_net_smtp M_net_smtp_t
Definition: m_net_smtp.h:52
void(* M_net_smtp_sent_cb)(const M_hash_dict_t *headers, void *thunk)
Definition: m_net_smtp.h:161
void(* M_net_smtp_reschedule_cb)(const char *msg, M_uint64 wait_sec, void *thunk)
Definition: m_net_smtp.h:192
M_bool M_net_smtp_queue_message(M_net_smtp_t *sp, const char *e)
@ M_NET_SMTP_LOAD_BALANCE_FAILOVER
Definition: m_net_smtp.h:71
@ M_NET_SMTP_LOAD_BALANCE_ROUNDROBIN
Definition: m_net_smtp.h:73
@ M_NET_SMTP_STATUS_NOENDPOINTS
Definition: m_net_smtp.h:62
@ M_NET_SMTP_STATUS_STOPPING
Definition: m_net_smtp.h:63
@ M_NET_SMTP_STATUS_STOPPED
Definition: m_net_smtp.h:61
@ M_NET_SMTP_STATUS_PROCESSING
Definition: m_net_smtp.h:60
@ M_NET_SMTP_STATUS_IDLE
Definition: m_net_smtp.h:59
Definition: m_net_smtp.h:215
struct M_tls_clientctx M_tls_clientctx_t
Definition: m_tls.h:45