i just wanted to try mail function in php which i have used earlier.i formatted my system so i had to re install xampp and my send mail code is not working
<?php
if(mail("mymail@gmail.com","hi","hii")) {
echo 'sent';
} else {
echo 'fail';
}
?>
I did all the changes to php.ini and sendmail.ini
sendmail.ini
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=465
smtp_ssl=ssl
default_domain=localhost
error_logfile=error.log
debug_logfile=debug.log
auth_username= mymail@gmail.com
auth_password= mypwd
pop3_server=
pop3_username=
pop3_password=
force_sender= mymail@gmail.com
hostname=localhost
php.ini
SMTP = smtp.gmail.com
smtp_port = 465
sendmail_from = postmaster@localhost
sendmail_path = "\"E:\xampp\sendmail\sendmail.exe\" -t"
I changed everything but still its not working.