SMTP: Invalid Address

Turns out this was caused by the way PHP talks to a mail provider provider, typically when talking to a Windows mail server. The solution was simple (once you figure it out), and involves removing the “<” section that adds the sender name so that your mail program can describe the email address it receives. That is .. change

$headers = “From: $name <$email>\n”;


$headers = “From: $email\n”;

Just needed to blog about it just in case I need it again.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.