summaryrefslogtreecommitdiff
path: root/win32/sendmail.c
diff options
context:
space:
mode:
authorMarkus Fischer <mfischer@php.net>2002-06-02 17:13:48 +0000
committerMarkus Fischer <mfischer@php.net>2002-06-02 17:13:48 +0000
commitb04656ad407268ca1223c40044f718fb94059c7b (patch)
tree706a9b3e5f8dc59dc70f5373278d09805011aab4 /win32/sendmail.c
parentc43f813d8e62a63e084530687168333299959e47 (diff)
downloadphp-git-b04656ad407268ca1223c40044f718fb94059c7b.tar.gz
- Finish implementation of custom smtp port (introduces "smtp_port" ini config).
Diffstat (limited to 'win32/sendmail.c')
-rw-r--r--win32/sendmail.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/win32/sendmail.c b/win32/sendmail.c
index 9234b9d231..052ecc0ff0 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -198,7 +198,10 @@ int TSendMail(char *host, int *error, char **error_message,
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 @@ int MailConnect()
}
*/
- portnum = (short) INI_INT("sendmail_port");
+ portnum = (short) INI_INT("smtp_port");
if (!portnum) {
portnum = 25;
}