specifying smtp server on win32 via 5th mail() parameter

From: Date: Sun, 28 Apr 2002 23:34:48 +0000
Subject: specifying smtp server on win32 via 5th mail() parameter
Groups: php.dev 
Request: Send a blank email to php-dev+get-83464@lists.php.net to get a copy of this message
as suggested at http://bugs.php.net/10629, the patch below would allow win32 users to specify the smtp server to use as the 5th parameter to the mail() function. (the 'pass random options to my sendmail program' parameter on unix systems.) any thoughts? (maybe it's better to just use ini_set()?) jim Index: ext/standard/mail.c =================================================================== RCS file: /repository/php4/ext/standard/mail.c,v retrieving revision 1.51 diff -u -r1.51 mail.c --- ext/standard/mail.c 16 Mar 2002 15:50:20 -0000 1.51 +++ ext/standard/mail.c 28 Apr 2002 23:27:56 -0000 @@ -121,7 +121,7 @@ if (!sendmail_path) { #ifdef PHP_WIN32 /* handle old style win smtp sending */ - if (TSendMail(INI_STR("SMTP"), &tsm_err, headers, subject, to, message) != SUCCESS){ + if (TSendMail(extra_cmd ? extra_cmd : INI_STR("SMTP"), &tsm_err, headers, subject, to, message) != SUCCESS){ php_error(E_WARNING, "%s() %s", get_active_function_name(TSRMLS_C), GetSMErrorText(tsm_err)); return 0; }

« previous php.dev (#83464) next »