December 28, 2006

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”;

to

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

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

Comment Below ↓

There are no comments yet, be the first!

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Media Corner

2

3

4

5

6