cvs: php4 /main main.c /win32 sendmail.c

From: Date: Sun, 02 Jun 2002 17:13:48 +0000
Subject: cvs: php4 /main main.c /win32 sendmail.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12199@lists.php.net to get a copy of this message
mfischer Sun Jun 2 13:13:48 2002 EDT Modified files: /php4/main main.c /php4/win32 sendmail.c Log: - Finish implementation of custom smtp port (introduces "smtp_port" ini config). Index: php4/main/main.c diff -u php4/main/main.c:1.456 php4/main/main.c:1.457 --- php4/main/main.c:1.456 Mon May 13 04:46:24 2002 +++ php4/main/main.c Sun Jun 2 13:13:48 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.456 2002/05/13 08:46:24 zeev Exp $ */ +/* $Id: main.c,v 1.457 2002/06/02 17:13:48 mfischer Exp $ */ /* {{{ includes */ @@ -288,6 +288,7 @@ STD_PHP_INI_ENTRY("error_prepend_string", NULL, PHP_INI_ALL, OnUpdateStringUnempty, error_prepend_string, php_core_globals, core_globals) PHP_INI_ENTRY("SMTP", "localhost",PHP_INI_ALL, NULL) + PHP_INI_ENTRY("smtp_port", "25", PHP_INI_ALL, NULL) PHP_INI_ENTRY("browscap", NULL, PHP_INI_SYSTEM, NULL) PHP_INI_ENTRY("error_reporting", NULL, PHP_INI_ALL, OnUpdateErrorReporting) #if MEMORY_LIMIT Index: php4/win32/sendmail.c diff -u php4/win32/sendmail.c:1.34 php4/win32/sendmail.c:1.35 --- php4/win32/sendmail.c:1.34 Sun Jun 2 12:25:06 2002 +++ php4/win32/sendmail.c Sun Jun 2 13:13:48 2002 @@ -17,7 +17,7 @@ * */ -/* $Id: sendmail.c,v 1.34 2002/06/02 16:25:06 mfischer Exp $ */ +/* $Id: sendmail.c,v 1.35 2002/06/02 17:13:48 mfischer Exp $ */ #include "php.h" /*php specific */ #include <stdio.h> @@ -198,7 +198,10 @@ if (NULL == (*error_message = ecalloc(1, HOST_NAME_LEN + 128))) { return FAILURE; } - snprintf(*error_message, HOST_NAME_LEN + 128, "Failed to connect to mailserver at \"%s\", verify your \"SMTP\" setting in php.ini", MailHost); + snprintf(*error_message, HOST_NAME_LEN + 128, + "Failed to connect to mailserver at \"%s\" port %d, verify your \"SMTP\"" + "and \"smtp_port\" setting in php.ini or use ini_set()", + MailHost, !INI_INT("smtp_port") ? 25 : INI_INT("smtp_port")); return FAILURE; } else { ret = SendText(RPath, Subject, mailTo, data, headers, headers_lc, error_message); @@ -609,7 +612,7 @@ } */ - portnum = (short) INI_INT("sendmail_port"); + portnum = (short) INI_INT("smtp_port"); if (!portnum) { portnum = 25; }

« previous php.cvs (#12199) next »