From 5e624647d2f2750cf1fe7f97d8c89718d187879d Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Sun, 20 Sep 2026 15:50:24 +0200 Subject: smtp: send messages with a PDF attachment --- src/smtp.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/smtp.h (limited to 'src/smtp.h') diff --git a/src/smtp.h b/src/smtp.h new file mode 100644 index 0000000..a6c4a34 --- /dev/null +++ b/src/smtp.h @@ -0,0 +1,24 @@ +#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 -- cgit v1.3