Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

Mail function using sendmail

the mail() function

Moderators: macek, egami, gesf

Mail function using sendmail

Postby dmajumdar82 » Sun Jan 06, 2013 5:31 am

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
Connect timed out.
is shown in error.log under sendmail foldder.
the code of my mail.php is given below
$MailToAddress = "";
$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!";
echo "e-mail! is sent";

In php.ini parameters are----

SMTP = ssl:// //
smtp_port =587
sendmail_from =
auth_username =
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

In sendmail.ini parameters are----

Please Please help me! :help:
Thank you
New php-forum User
New php-forum User
Posts: 1
Joined: Wed Jan 02, 2013 11:21 pm

Re: Mail function using sendmail

Postby aravindoptimus » Thu Mar 07, 2013 2:07 am

Its Simple from Localhost we cant send mail :(... Try the file from server.. It will work :D
User avatar
New php-forum User
New php-forum User
Posts: 11
Joined: Thu Mar 07, 2013 2:00 am

Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.