php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
sendmail.c File Reference
#include "php.h"
#include <stdio.h>
#include <stdlib.h>
#include <winsock2.h>
#include "time.h"
#include <Ws2tcpip.h>
#include <string.h>
#include <math.h>
#include <malloc.h>
#include <winbase.h>
#include "sendmail.h"
#include "php_ini.h"
#include "php_win32_globals.h"
#include "ext/pcre/php_pcre.h"
#include "ext/standard/php_string.h"
#include "ext/date/php_date.h"

Go to the source code of this file.

Macros

#define SENDMAIL_DEBUG   0
 
#define SMTP_ERROR_RESPONSE_SPEC   "SMTP server response: %s"
 
#define SMTP_ERROR_RESPONSE(response)
 
#define SMTP_SKIP_SPACE(str)
 
#define PHP_WIN32_MAIL_UNIFY_PATTERN   "/(\r\n?)|\n/"
 
#define PHP_WIN32_MAIL_UNIFY_REPLACE   "\r\n"
 
#define PHP_WIN32_MAIL_RMVDBL_PATTERN   "/^\r\n|(\r\n)+$/m"
 
#define PHP_WIN32_MAIL_RMVDBL_REPLACE   ""
 
#define PHP_WIN32_MAIL_DOT_PATTERN   "\n."
 
#define PHP_WIN32_MAIL_DOT_REPLACE   "\n.."
 

Functions

PHPAPI int TSendMail (const char *host, int *error, char **error_message, const char *headers, const char *Subject, const char *mailTo, const char *data, char *mailCc, char *mailBcc, char *mailRPath)
 
PHPAPI void TSMClose (void)
 
PHPAPI char * GetSMErrorText (int index)
 

Variables

char seps [] = " ,\t\n"
 
char * php_mailer = "PHP 7 WIN32"
 

Macro Definition Documentation

◆ PHP_WIN32_MAIL_DOT_PATTERN

#define PHP_WIN32_MAIL_DOT_PATTERN   "\n."

Definition at line 111 of file sendmail.c.

◆ PHP_WIN32_MAIL_DOT_REPLACE

#define PHP_WIN32_MAIL_DOT_REPLACE   "\n.."

Definition at line 112 of file sendmail.c.

◆ PHP_WIN32_MAIL_RMVDBL_PATTERN

#define PHP_WIN32_MAIL_RMVDBL_PATTERN   "/^\r\n|(\r\n)+$/m"

Definition at line 104 of file sendmail.c.

◆ PHP_WIN32_MAIL_RMVDBL_REPLACE

#define PHP_WIN32_MAIL_RMVDBL_REPLACE   ""

Definition at line 105 of file sendmail.c.

◆ PHP_WIN32_MAIL_UNIFY_PATTERN

#define PHP_WIN32_MAIL_UNIFY_PATTERN   "/(\r\n?)|\n/"

Definition at line 97 of file sendmail.c.

◆ PHP_WIN32_MAIL_UNIFY_REPLACE

#define PHP_WIN32_MAIL_UNIFY_REPLACE   "\r\n"

Definition at line 98 of file sendmail.c.

◆ SENDMAIL_DEBUG

#define SENDMAIL_DEBUG   0

Definition at line 39 of file sendmail.c.

◆ SMTP_ERROR_RESPONSE

#define SMTP_ERROR_RESPONSE ( response)
Value:
{ \
if (response && error_message) { \
*error_message = ecalloc(1, sizeof(SMTP_ERROR_RESPONSE_SPEC) + strlen(response)); \
snprintf(*error_message, sizeof(SMTP_ERROR_RESPONSE_SPEC) + strlen(response), SMTP_ERROR_RESPONSE_SPEC, response); \
efree(response); \
} \
}
#define SMTP_ERROR_RESPONSE_SPEC
Definition sendmail.c:48
#define ecalloc(nmemb, size)
Definition zend_alloc.h:158
strlen(string $string)

Definition at line 52 of file sendmail.c.

◆ SMTP_ERROR_RESPONSE_SPEC

#define SMTP_ERROR_RESPONSE_SPEC   "SMTP server response: %s"

Definition at line 48 of file sendmail.c.

◆ SMTP_SKIP_SPACE

#define SMTP_SKIP_SPACE ( str)
Value:
{ while (isspace(*str)) { str++; } }

Definition at line 59 of file sendmail.c.

Function Documentation

◆ GetSMErrorText()

PHPAPI char * GetSMErrorText ( int index)

Definition at line 324 of file sendmail.c.

◆ TSendMail()

PHPAPI int TSendMail ( const char * host,
int * error,
char ** error_message,
const char * headers,
const char * Subject,
const char * mailTo,
const char * data,
char * mailCc,
char * mailBcc,
char * mailRPath )

Definition at line 178 of file sendmail.c.

◆ TSMClose()

PHPAPI void TSMClose ( void )

Definition at line 302 of file sendmail.c.

Variable Documentation

◆ php_mailer

char* php_mailer = "PHP 7 WIN32"

Definition at line 63 of file sendmail.c.

◆ seps

char seps[] = " ,\t\n"

Definition at line 62 of file sendmail.c.