SMTP server response: 553 5.3.0 … DISCARD Spam Relay
Wednesday, September 26th, 2007
[Sending email from a Windows server using PHP]
I got the cryptic error message above while trying to send email using PHP from a Windows server. Turned out that the problem was that php.ini had set the sendmail_from entry to the silly value “me@localhost.com.” Since this is a shared hosting situation, we couldn’t change php.ini directly. However, we were able to use the ini_set function in the script that sent the mail:
ini_set(”sendmail_from”, “a-real-address@the-actual-domain.com”);
This fixed the problem.