Hi guys,
I am a bit confused.
I'm working to a PHP mail sender script, but i got in trouble with PHP 4.3.2 and Win2k.
I discovered that my old script (working good with PHP 4.1.2 and Win NT4) after passing to Win 2k and PHP 4.3.2 seems not to connect to mail server.
Below is what i submit to mail function in myscript:
<?
...
$mailstatus = mail('webmaster@mydomain.com', 'Mail Subject', 'Some piece of mail body ...', 'From: someuser@mydomain.com');
return $mailstatus;
...
?>
The rows above work good in PHP 4.1.2 and returned $mailstatus value is 1, but with PHP 4.2.3 i got this error message:
<b>Warning:</b> Failed to connect to mailserver
verify your "SMTP" setting in php.ini.
In the real script i pass mail arguments by reference. I argued that the error woul have been in that, but I tried to pass them by values with no success.
I checked two php.ini files (version 4.1.2 and 4.3.2) for differences but i didn't find anything wrong:
SMTP = mymailserver.mydomain.com for all
Register_globas = Off in both files
sendmail_from = mailer@mydomain.com that is a registered account of our mail server
Anyone can answer me?