PHP sending problems

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?
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" <> 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=?=" <> This is an example of Russian encoding in the From: address.