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("[email protected]","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= [email protected]
auth_password= mypwd
pop3_server=
pop3_username=
pop3_password=
force_sender= [email protected]
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.