PHP sending problems

By admin / February 5, 2008

Question:
I am trying to send an email using my PHP program and I am getting an error:
500 < sitename > is not a valid email.
What should I do?


Question:
I am trying to send an email using my PHP program and I am getting an error:
500 < sitename > is not a valid email.
What should I do?

Answer:
Some PHP programs (depending on which package you use) actually send incorrectly formatted email adresses. The correct email address in the SMTP protocol exchange looks like this:
“Your Name” <email@domain.com>
In some cases, where the name on the email is not written using latin characters, it will be encoded and will look like this:
“=?KOI8-R?B?7sHExdbEwSDn1cvP18E=?=” <email@example.com>
This is an example of Russian encoding in the From: address.

About the author

admin

Leave a comment: