aboutsummaryrefslogtreecommitdiff
path: root/src/smtp.h
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-20 15:50:24 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-20 15:50:42 +0200
commit5e624647d2f2750cf1fe7f97d8c89718d187879d (patch)
tree6909b8ddc7ee6a1843ecab064fbf8b96e662eaa0 /src/smtp.h
parentfb2addedce94bea29c9be5eab2786e621a5d0e65 (diff)
downloadbokf-5e624647d2f2750cf1fe7f97d8c89718d187879d.tar.gz
bokf-5e624647d2f2750cf1fe7f97d8c89718d187879d.zip
smtp: send messages with a PDF attachment
Diffstat (limited to 'src/smtp.h')
-rw-r--r--src/smtp.h24
1 files changed, 24 insertions, 0 deletions
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 <stddef.h>
+
+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