Hi i am writing a php code to send email from my exchange server to user. however, keep receiving the the Warning message below:
Warning: Unknown error in c:\phpdev5\www\ mailtest2.php on line 5
my php code:
[CODE=php]<?php
$to = "test1@example. com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Messag e successfully sent!</p>");
} else {
echo("<p>Messag e delivery failed...</p>");
}
?>[/CODE]
php.ini setting:
Can anyone pls tel me what's wrong with my code or php setting?
Thanks.
Warning: Unknown error in c:\phpdev5\www\ mailtest2.php on line 5
my php code:
[CODE=php]<?php
$to = "test1@example. com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Messag e successfully sent!</p>");
} else {
echo("<p>Messag e delivery failed...</p>");
}
?>[/CODE]
php.ini setting:
Code:
[mail function] ; For Win32 only. SMTP = gss-exchange1.example.com SMTP_Port = 25 ; For Win32 only. sendmail_from = test2@example.com
Thanks.
Comment