Page 1 of 1

PEAR Mail - address list issue

Posted: Tue Jul 06, 2010 1:03 pm
by shawngoldw
Hey, I'm using PEAR Mail to send email from my server through gmail. I am having a problem with sending emails to a list of users though. I build a list of email address to use as the 'to' field of the email but say my list looks like this:

Code: Select all

'Bob Vance' <bobvance@gmail.com>, 'Tim Smith' <timsmith@hotmail.com>, 'Aleksándr Chu' <aleksandrchu@yahoo.com>
no one will receive the email.

It will work if it looks like this instead:

Code: Select all

'Bob Vance' <bobvance@gmail.com>, 'Tim Smith' <timsmith@hotmail.com>, 'Aleksandr Chu' <aleksandrchu@yahoo.com>
The difference is hard to spot, but in the first case there in an accent in Aleksándr which is not in the second case.


If anyone could explain why the accent breaks the system or how to fix it it would be appreciated. If I am unclear please let me know and I will try to clarify.

Thanks,
Shawn

Re: PEAR Mail - address list issue

Posted: Tue Jul 06, 2010 2:00 pm
by Jade
The problem is that the accent isn't in the encoding. Try changing using ord and convert it to ascii: http://www.asciitable.com/

Re: PEAR Mail - address list issue

Posted: Tue Jul 06, 2010 2:44 pm
by shawngoldw
Thank you, ord converts the first character of a string to it's ascii value, how can I find and convert every alphabetical (not alphanumeric) character to ascii?