Mercurial > dovecot > core-2.2
annotate src/lib-lda/smtp-client.h @ 17285:605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 29 Apr 2014 00:50:08 +0300 |
parents | 0f9ce0073c8d |
children | f101636138fa |
rev | line source |
---|---|
9092
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
1 #ifndef SMTP_CLIENT_H |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
2 #define SMTP_CLIENT_H |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
3 |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
4 #include <stdio.h> |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
5 |
14629
c93ca5e46a8a
Marked functions parameters that are allowed to be NULL. Some APIs were also changed.
Timo Sirainen <tss@iki.fi>
parents:
14225
diff
changeset
|
6 struct smtp_client * ATTR_NULL(3) |
17285
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
7 smtp_client_init(const struct lda_settings *set, const char *return_path); |
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
8 /* Add a new recipient */ |
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
9 void smtp_client_add_rcpt(struct smtp_client *client, const char *address); |
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
10 /* Get an output stream where the message can be written to. The recipients |
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
11 must already be added before calling this. */ |
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
12 struct ostream *smtp_client_send(struct smtp_client *client); |
17266
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
13 /* Returns 1 on success, 0 on permanent failure (e.g. invalid destination), |
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
14 -1 on temporary failure. */ |
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
15 int smtp_client_deinit(struct smtp_client *client, const char **error_r); |
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
16 |
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
17 /* FIXME: obsolete API, remove in v2.3: */ |
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
18 struct smtp_client * ATTR_NULL(3) |
9805
882a0a6cc92e
smtp_client_open() API changed to take lda_settings instead of mail_deliver_context.
Timo Sirainen <tss@iki.fi>
parents:
9092
diff
changeset
|
19 smtp_client_open(const struct lda_settings *set, const char *destination, |
14225
e915b7e734e7
lib-lda: smtp_client_open() API changed to return struct ostream, not FILE.
Timo Sirainen <tss@iki.fi>
parents:
9805
diff
changeset
|
20 const char *return_path, struct ostream **output_r); |
9092
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
21 /* Returns sysexits-compatible return value */ |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
22 int smtp_client_close(struct smtp_client *client); |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
23 |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
24 #endif |