mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
92ac598aab
This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
50 lines
1.8 KiB
C
50 lines
1.8 KiB
C
#if !defined(sendmail_h) /* Sentry, use file only if it's not already included. */
|
|
#define sendmail_h
|
|
#include <windows.h>
|
|
|
|
#define HOST_NAME_LEN 256
|
|
#define MAX_APPNAME_LENGTH 100
|
|
#define MAIL_BUFFER_SIZE (1024*4) /* 4k buffer */
|
|
/* Return values */
|
|
#define MIN_ERROR_INDEX 0 /* Always 0 like SUCCESS */
|
|
#define SUCCESS 0
|
|
#define FAILED_TO_PARSE_ARGUMENTS 1
|
|
#define FAILED_TO_OPEN_MAILFILE 2
|
|
#define FAILED_TO_START_SOCKETS 3
|
|
#define FAILED_TO_RESOLVE_HOST 4
|
|
#define FAILED_TO_OBTAIN_SOCKET_HANDLE 5
|
|
#define FAILED_TO_CONNECT 6
|
|
#define FAILED_TO_SEND 7
|
|
#define FAILED_TO_RECEIVE 8
|
|
#define SMTP_SERVER_ERROR 9
|
|
#define FAILED_TO_GET_HOSTNAME 10
|
|
#define OUT_OF_MEMORY 11
|
|
#define UNKNOWN_ERROR 12
|
|
#define BAD_MSG_CONTENTS 13
|
|
#define BAD_MSG_SUBJECT 14
|
|
#define BAD_MSG_DESTINATION 15
|
|
#define BAD_MSG_RPATH 16
|
|
#define BAD_MAIL_HOST 17
|
|
#define BAD_MSG_FILE 18
|
|
#define W32_SM_SENDMAIL_FROM_NOT_SET 19
|
|
#define W32_SM_SENDMAIL_FROM_MALFORMED 20
|
|
#define W32_SM_PCRE_ERROR 21
|
|
#define MAX_ERROR_INDEX 22 /* Always last error message + 1 */
|
|
|
|
|
|
PHPAPI int TSendMail(char *smtpaddr, int *returnerror, char **error_message,
|
|
char *RPath, char *Subject, char *mailTo, char *data,
|
|
char *mailCc, char *mailBcc, char *mailRPath);
|
|
PHPAPI void TSMClose(void);
|
|
static int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char *mailBcc, char *data,
|
|
char *headers, char *headers_lc, char **error_message);
|
|
PHPAPI char *GetSMErrorText(int index);
|
|
|
|
static int MailConnect();
|
|
static int PostHeader(char *RPath, char *Subject, char *mailTo, char *xheaders);
|
|
static int Post(LPCSTR msg);
|
|
static int Ack(char **server_response);
|
|
static unsigned long GetAddr(LPSTR szHost);
|
|
static int FormatEmailAddress(char* Buf, char* EmailAddress, char* FormatString);
|
|
#endif /* sendmail_h */
|