home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
PPPBCKP
/
SRC
/
SRC15B23.ZIP
/
POP.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-03-31
|
3KB
|
78 lines
#define SMTP_STATUS 211
#define SMTP_HELP 214
#define SMTP_READY 220
#define SMTP_BYE 221
#define SMTP_OK 250
#define SMTP_WILL_FWD 251
#define SMTP_GIMME 354
#define SMTP_OOPS 421
#define SMTP_BUSY 450
#define SMTP_ERROR 451
#define SMTP_SQUEEZED 452
#define SMTP_SYNTAX 500
#define SMTP_PARAM 501
#define SMTP_COM_NI 502
#define SMTP_BAD_SEQ 503
#define SMTP_BAD_PARM 504
#define SMTP_ACCESS 550
#define SMTP_YOU_FWD 551
#define SMTP_FULL 552
#define SMTP_BAD_NAM 553
#define SMTP_FAILED 554
#define POP_OK 200
#define POP_NOT_MSG 400
#define POP_BAD_HOST 500
#define POP_HOST_UNAVAILABLE 501
#define POP_BAD_MBOX 510
#define POP_BAD_PASS 511
#define POP_UNKNOWN 599
#define POPLIB_OK 200
#define POPLIB_BAD_FILE 401
#define POPLIB_BAD_HOST 510
#define POPLIB_S_TIMEOU 510
#define POPLIB_S_CLOSED 511
#define POPLIB_SMTP_ERR 520
#define POPLIB_POP_ERR 521
#define POPLIB_SMTP_PROB 410
#define POPLIB_POP_PROB 411
typedef struct Mail_Socket {
tcp_Socket *sock;
} Mail_Socket;
extern int POPLIB_Err_Cond;
extern char *POPLIB_Err_Msg;
extern int POP_Err_Cond;
extern char *POP_Err_Msg;
extern int SMTP_Err_Cond;
extern char *SMTP_Err_Msg;
Mail_Socket *pop_init(char *host);
int pop_login(Mail_Socket * pop_sock, char *userid, char *password);
int pop_status(Mail_Socket * pop_sock, unsigned int *count, unsigned long *totallength);
long pop_length(Mail_Socket * pop_sock, unsigned int msg_num, unsigned long *size);
int pop_list(Mail_Socket * pop_sock, unsigned int msg_nums[], unsigned long sizes[]);
int pop_delete(Mail_Socket * pop_sock, unsigned int msg_num);
int pop_getf(Mail_Socket * pop_sock, char *fn, unsigned int msg_num);
int pop_get_nextf(Mail_Socket * POP_sock, char *fn, int msgnum);
int pop_get_file(Mail_Socket * pop_sock, char *fname, unsigned int msg_num);
int pop_get_next_file(Mail_Socket * pop_sock, char *fname);
int pop_shutdown(Mail_Socket * pop_sock);
Mail_Socket *smtp_start(char *host, char *dom);
char *smtp_parse_from_line(FILE * f);
char **smtp_parse_to_line(FILE * f);
int smtp_send_MAIL_FROM_line(Mail_Socket * smtp_sock, FILE * f);
int smtp_send_RCPT_TO_line(Mail_Socket * smtp_sock, FILE * f);
int smtp_sendf(Mail_Socket * smtp_sock, FILE * f);
int smtp_send_file(Mail_Socket * smtp_sock, char *fname);
int smtp_shutdown(Mail_Socket * smtp_sock);