Submitted by Nsis_licensing on Wed, 01/09/2019 - 07:21 Pro Licensee
I can send an email from the command line using this
<?PHP
$sender = 'someone@somedomain.tld';
$recipient = 'you@yourdomain.tld';
$subject = "php mail test";
$message = "php test message";
$headers = 'From:' . $sender;
if (mail($recipient, $subject, $message, $headers))
{
echo "Message accepted";
}
else
{
echo "Error: Message not accepted";
}
?>
but in the browser I get "Not Accepted" and I am not sure why.
Status:
Closed (fixed)
Comments
Submitted by Nsis_licensing on Wed, 01/09/2019 - 07:46 Pro Licensee Comment #1
Nevermind, i fixed this
I had to use "/usr/sbin/sendmail -t -i" instead of "/usr/bin/mail" for it to work properly.
Submitted by Nsis_licensing on Wed, 01/09/2019 - 08:23 Pro Licensee Comment #2
I am marking this fixed
Submitted by IssueBot on Wed, 01/23/2019 - 08:30 Comment #3
Automatically closed - issue fixed for 2 weeks with no activity.