summaryrefslogtreecommitdiff
path: root/smtp.h
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@users.sourceforge.net>2003-07-03 17:37:11 +0000
committerJosé Fonseca <jrfonseca@users.sourceforge.net>2003-07-03 17:37:11 +0000
commit2867d16bc9bae9764904efbf44cd5131fca1bc9b (patch)
tree1e910b1566a40e9b02961bf5aed2958b9fa7b974 /smtp.h
parent2b266bab3687c078061c7b8bf3676ef3a61d53a7 (diff)
Modularization of the code.
Hability to get the recipients from the message headers. Local delivery via a MDA.
Diffstat (limited to 'smtp.h')
-rw-r--r--smtp.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/smtp.h b/smtp.h
new file mode 100644
index 0000000..da18bc6
--- /dev/null
+++ b/smtp.h
@@ -0,0 +1,59 @@
+/**
+ * \file smtp.h
+ */
+
+#ifndef _SMTP_H
+#define _SMTP_H
+
+
+#include <libesmtp.h>
+
+#include "list.h"
+#include "message.h"
+
+
+/**
+ * \name Identity management
+ */
+/*@{*/
+
+/**
+ * Identity.
+ */
+typedef struct {
+ struct list_head list;
+ char *address;
+ char *host;
+ char *user;
+ char *pass;
+ enum starttls_option starttls; /**< it should default to Starttls_DISABLED */
+ char *certificate_passphrase;
+} identity_t;
+
+/**
+ * Default identity.
+ */
+extern identity_t *default_identity;
+
+/** Create a new identity */
+identity_t *identity_new(void);
+
+/** Add a new identity */
+void identity_add(identity_t *identity);
+
+/** Lookup a identity */
+identity_t *identity_lookup(const char *address);
+
+/** Initialize the identities resources */
+int identities_init(void);
+
+/** Cleanup the resources associated with the identities */
+void identities_cleanup(void);
+
+/*@}*/
+
+
+/** Send a message via a SMTP server */
+int smtp_send(message_t *msg);
+
+#endif