Here are my configuration files.


[sendmail] ; you must change to your smtp server, ;
or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup) ;
emails delivered via IIS's pickup directory cause sendmail to ;
run quicker, but you won't get error messages back to the calling ; application.
smtp_server=(Correct SMTP Server) ;
smtp port (normally 25)


[mail function] ;
For Win32 only. ; SMTP = (Correct SMTP Server) ; smtp_port = 25 ;
For Win32 only. ;
sendmail_from = (user@( <- correct name

PHP code

<?php $
from_name = "testing";
$from_email = "";
$headers = "From: $from_name <$from_email>";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$body = "Hi,\nThis is a test mail from $from_name <$from_email>.";
$subject = "Test mail from test";
$to = "";
if (mail($to, $subject, $body, $headers))
echo "success!";
{ echo "fail…"; }

When i ran the code, it said "successful" but when I checked the email, there is nothing to received... please help urgently!

Thank you i will provide as many relevant information as possible to solve this issue.

I have been trying to solve this for many days already but it does not show. SMTP port is not blocked by ISP. I used my own personal hotmail address to send to the company's email and it worked.

Vice versa, i used my company's email to send "test" to my personal hotmail address. This shows that the company does not block out-bound traffic, what could be the problem now?