- Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathsendmail.h
49 lines (45 loc) · 1.87 KB
/
sendmail.h
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
#if !defined(sendmail_h) /* Sentry, use file only if it's not already included. */
#definesendmail_h
#include<windows.h>
#defineHOST_NAME_LEN 256
#defineMAX_APPNAME_LENGTH 100
#defineMAIL_BUFFER_SIZE (1024*4) /* 4k buffer */
/* Return values */
#defineMIN_ERROR_INDEX 0 /* Always 0 like SUCCESS */
#defineSUCCESS 0
#defineFAILED_TO_PARSE_ARGUMENTS 1
#defineFAILED_TO_OPEN_MAILFILE 2
#defineFAILED_TO_START_SOCKETS 3
#defineFAILED_TO_RESOLVE_HOST 4
#defineFAILED_TO_OBTAIN_SOCKET_HANDLE 5
#defineFAILED_TO_CONNECT 6
#defineFAILED_TO_SEND 7
#defineFAILED_TO_RECEIVE 8
#defineSMTP_SERVER_ERROR 9
#defineFAILED_TO_GET_HOSTNAME 10
#defineOUT_OF_MEMORY 11
#defineUNKNOWN_ERROR 12
#defineBAD_MSG_CONTENTS 13
#defineBAD_MSG_SUBJECT 14
#defineBAD_MSG_DESTINATION 15
#defineBAD_MSG_RPATH 16
#defineBAD_MAIL_HOST 17
#defineBAD_MSG_FILE 18
#defineW32_SM_SENDMAIL_FROM_NOT_SET 19
#defineW32_SM_SENDMAIL_FROM_MALFORMED 20
#defineW32_SM_PCRE_ERROR 21
#defineMAX_ERROR_INDEX 22 /* Always last error message + 1 */
PHPAPIintTSendMail(constchar*host, int*error, char**error_message,
constchar*headers, constchar*Subject, constchar*mailTo, constchar*data,
char*mailCc, char*mailBcc, char*mailRPath);
PHPAPIvoidTSMClose(void);
staticintSendText(char*RPath, constchar*Subject, constchar*mailTo, char*mailCc, char*mailBcc, constchar*data,
constchar*headers, char*headers_lc, char**error_message);
PHPAPIchar*GetSMErrorText(intindex);
staticintMailConnect();
staticintPostHeader(char*RPath, constchar*Subject, constchar*mailTo, char*xheaders);
staticintPost(LPCSTRmsg);
staticintAck(char**server_response);
staticunsigned longGetAddr(LPSTRszHost);
staticintFormatEmailAddress(char*Buf, char*EmailAddress, char*FormatString);
#endif/* sendmail_h */