I am new in php domain,wants to send mail to my gmail account from another gmail account.
I am using Xampp 1.7.1 from win 7 .After several changes that I have made in php.ini and sendmail.ini now my mail function returns true value but no mail is actually sent in my mailbox and a message
is shown in error.log under sendmail foldder.Connect timed out.
the code of my mail.php is given below
<?php
$MailToAddress = "debasri28@gmail.com";
$MailSubject = "Subject goes here";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
if (!mail($MailToAddress, $MailSubject, "hello",$headers))
echo "Error sending e-mail!";
else
echo "e-mail! is sent";
?>
In php.ini parameters are----
SMTP = ssl://smtp.gmail.com //smtp.gmail.com
smtp_port =587
sendmail_from = mymail@gmail.com
auth_username = mymail@gmail.com
auth_password=xxxxxxxx
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"
In sendmail.ini parameters are----
[color=#40FFFF]smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=auto
error_logfile=error.log
debug_logfile=debug.log
auth_username=mymail@gmail.com
auth_password=xxxxxxxx
force_sender=mymail@gmail.com[/color]
Please Please help me!
Thank you


... Try the file from server.. It will work 