mail function is not working in localhost server
问题 I am on my localhost server. I am using this code below, but I never received the email. <?php $to = "someone@example.com"; $subject = "Test mail"; $message = "Hello! This is a simple email message."; $from = "someonelse@example.com"; $headers = "From:" . $from; mail($to,$subject,$message,$headers); echo "Mail Sent."; ?> 回答1: I know its kinda late... check if your localhost is configured to send email On ubuntu terminal try executing following command # apt-get install sendmail 回答2: Make sure