blob: 5df10ca2655bc57e616bc3b55881948854b3526a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/**
* \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; /**< reverse path address */
char *host; /**< hostname and service (port) */
/** \name Auth Extension */
/*@{*/
char *user;
char *pass;
/*@}*/
/** \name StartTLS Extension */
/*@{*/
enum starttls_option starttls;
char *certificate_passphrase;
/*@}*/
/** \name Pre-connect Command */
/*@{*/
char *preconnect;
/*@}*/
} 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 */
void identities_init(void);
/** Cleanup the resources associated with the identities */
void identities_cleanup(void);
/*@}*/
/** Send a message via a SMTP server */
void smtp_send(message_t *msg);
#endif
|