]> Pileus Git - ~andy/fetchmail/blob - smtp.h
* SMTP/LMTP cleanup to fix these two bugs:
[~andy/fetchmail] / smtp.h
1 /*
2  * smtp.h -- prototypes for smtp handling code
3  *
4  * For license terms, see the file COPYING in this directory.
5  */
6
7 #ifndef _POPSMTP_
8 #define _POPSMTP_
9
10 #include "config.h"
11
12 #define         SMTPBUFSIZE     256
13
14 /* SMTP error values */
15 #define         SM_OK              0
16 #define         SM_ERROR           128
17 #define         SM_UNRECOVERABLE   129
18
19 /* ESMTP extension option masks (not all options are listed here) */
20 #define ESMTP_8BITMIME  0x01
21 #define ESMTP_SIZE      0x02
22 #define ESMTP_ETRN      0x04
23 #define ESMTP_ATRN      0x08            /* used with ODMR, RFC 2645 */
24 #define ESMTP_AUTH      0x10
25
26 extern time_t last_smtp_ok;
27
28 int SMTP_helo(int socket, char smtp_mode, const char *host);
29 int SMTP_ehlo(int socket, char smtp_mode, const char *host, char *name, char *passwd, int *opt);
30 int SMTP_from(int socket, char smtp_mode, const char *from,const char *opts);
31 int SMTP_rcpt(int socket, char smtp_mode, const char *to);
32 int SMTP_data(int socket, char smtp_mode);
33 int SMTP_eom(int socket, char smtp_mode);
34 int SMTP_rset(int socket, char smtp_mode);
35 int SMTP_quit(int socket, char smtp_mode);
36 int SMTP_ok(int socket, char smtp_mode);
37
38 extern char smtp_response[MSGBUFSIZE];
39
40 #endif