sendmail from localhost is driving me crazy! [message #184801] |
Mon, 03 February 2014 09:03 |
shumit
Messages: 1 Registered: February 2014
Karma:
|
Junior Member |
|
|
I have followed the universally accepted methods for sending mail from gmail but I cannot yet send a single email. I am using wampserver.
My sendmail config is
smtp_server=smtp.gmail.com
smtp_port=465
smtp_ssl=SSL
default_domain=localhost
error_logfile=error.log
auth_username=myaccount(at)gmail(dot)com
auth_password=pwd
hostname=localhost
Pretty standard.
My Php.ini file now contains the following
sendmail_path = "c:\wamp\sendmail\sendmail.exe -t -i"
And yet I cannot send a mail. I had this working before I moved my PC from XP to Windows 8 so I really don't know what is wrong.I have tried every combination of port and SSL, turned off firewalls. Nothing.
I enabled “ssl_module” module in Apache server
and
enabled “php_openssl” and “php_sockets” extensions for PHP compiler.
But nothing is coming through. My PHP code is pretty simple
$to = 'shumit(at)gmail(dot)com';
$subject = 'Testing sendmail.exe';
$message = 'Hi, you just received an email using sendmail!';
$headers = 'From: tttt(at)gmail(dot)com' . "\r\n" .
'Reply-To: tttt(at)gmail(dot)com' . "\r\n" .
'MIME-Version: 1.0' . "\r\n" .
'Content-type: text/html; charset=iso-8859-1' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(mail($to, $subject, $message, $headers))
echo "Email sent. ";
else
echo "Email sending failed. ";
Any ideas?
thanks is advance
Shumit
|
|
|