#ifndef BOKF_SMTP_H #define BOKF_SMTP_H #include struct smtp_message { const char *host; int port; const char *security; /* "tls" (implicit), "starttls", "plain" */ const char *user; /* NULL/empty = no AUTH */ const char *password; const char *from; /* envelope + From address */ const char *from_name; /* display name, may be NULL */ const char *to; const char *subject; const char *body; /* UTF-8 text body */ const char *attach_name; /* NULL -> text-only */ const unsigned char *attach; size_t attach_len; }; int smtp_send(const struct smtp_message *m, char *err, size_t errlen); #endif