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
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);
}
*/
- portnum = (short) INI_INT("sendmail_port");
+ portnum = (short) INI_INT("smtp_port");
if (!portnum) {
portnum = 25;
}