I Cant send Mail From Localhost. I Use Xampp And My php.ini And sendmail.ini File Are Proper Configured
What Can I Do Now?
I Cant send Mail From Localhost. I Use Xampp And My php.ini And sendmail.ini File Are Proper Configured
What Can I Do Now?
You cannot send mail from localhost using mail
function. you have to use SMTP
in order to send email.
Check this for how to use SMTP to send email.
If you only need to test your mail function without being connected to the internet, you should use Papercut, this simple application to test send mail. You don't need to configure anything.
Just run it and try test send mail.
sendmail.php
<?php
$to = "sampleperson@example.com";
$subject = "My Subject";
$txt = "My sample msg.";
$headers = "From: webmaster@example.com" . "\r\n" .
"CC: somebodyelse@example.com";
mail($to,$subject,$txt,$headers);
?>
You will get this. Papercut Inbox
Download Papercut here