简体   繁体   中英

can not sending mail by php script

I installed xampp in my windows.I have write a php code for sending mail.Here it is

$to="example@gmail.com";
$subject="Test mail";
$message="sany and sovon";
if(mail($to,$subject,$message))
  echo "mail sent succesfully";
else 
  echo "delivered failed"

My sendmail cofiguration in php.ini file is here [mail function]

SMTP = localhost
smtp_port = 25


sendmail_from = localhost

I think the problem is in "sendmail_from".It needs my mail server address.where i get the address.There is a sendmail folder in xampp directory.Please help.Thanks in advance.....

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM