I have done the setting in sendmail.ini
and php.ini
so that I can send email by using gmail. The recipient is my hotmail. When I open my hotmail, nothing is received from my gmail. Can anyone help me with that? below is my php code:
<?php
$to = 'kill_stealer90@hotmail.com';
$subject = 'hello';
$message = 'why i so pro';
$headers = 'From:jackychickenchan@gmail.com';
if (mail($to,$subject,$message,$headers)){
echo("<p>sent</p>");
}else{
echo("<p>failed</p>");
}
?>
and here is my sendmail.ini setting
smtp_server=smtp.gmail.com
; smtp port (normally 25)
smtp_port=465
smtp_ssl=auto
auth_username=jackylonelyboy+gmail.com
auth_password=nemesis90
and here is my php.ini setting
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
; SMTP = smtp.gmail.com
; smtp_port = 465
You didn't uncomment your SMTP server. Take the semi-colons out of the SMTP and port lines in your php.ini.
I think you should use jackylonelyboy@gmail.com
instead jackylonelyboy+gmail.com
as user name for the authentication.