Following is the configuration in php.ini
and sendmail.ini
respectively :
[mail function]
sendmail_path = ""\"E:\Installed_Apps\xampp\sendmail\sendmail.exe\" -t""
mail.add_x_header = Off
[sendmail]
SMTP = localhost
smtp_port = 25
smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=auto
error_logfile=error.log
auth_username=my_gmail_address
auth_password=my_xxxxxx
pop3_server=
pop3_username=
pop3_password=
force_recipient=
hostname=
And I try to send email as :
<?php
$sent = mail('to_someone@hotmail.com','Message sent from XAMPP','Hey ! I just sent you a message using XAMPP');
if($sent) {
echo "Mail sent successfully";
}else {
echo "Sending failed";
}
I always get true
for $sent
but there is no email received at the above address. What could be the reason for this ? Is there anything wrong with the configuration file ?
Note :
I uploaded php.ini
and sendmail.ini
@ github and I am running mercury on 25