I have installed Postfix as per suggestion (on DigitalOcean) for PHP mail(), But its not working.
i have just create droplet and setup LEMP and all postfix steps executed without any issues, but not working mail.
$to = 'youremail@email.com';
$subject = 'mail subject';
$message = 'Mail Body';
$headers = 'From: info@email.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(mail($to, $subject, $message, $headers)){
echo "done";
}else{
echo "not sent";
}
?>
Run with ip address like (dummy ip) : http://122.21.23.21/emailfile.php
executed url and seems mail sent. But not getting mail.
Pleae any one have idea about this please suggest.
- 2 likes
- 4 comments