I think line 250 of print_mail/print_mail.inc
$from = '"'. $form_state['values']['fld_from_name'] .'" <'. $form_state['values']['fld_from_addr'] .'>';
should look like this
$from = '"'. addslashes(mime_header_encode($form_state['values']['fld_from_name'])) .'" <'. $form_state['values']['fld_from_addr'] .'>';

It fixed a bug for users with non ASCII characters in their names on my website.

Comments

jcnventura’s picture

Hi,

Can you tell me an example of such a username??

kargal’s picture

Some examples :
Dorothée
Andrée
Laëtitia

Kind of firstnames you don't usually see with an american or english community ;)

jcnventura’s picture

Well, my first name is João, so I certainly relate to that.

I think I see what the bug is. :) I'll try to see what I can do.

João

jcnventura’s picture

Status: Active » Needs review
jcnventura’s picture

Status: Needs review » Fixed

Thanks for the suggestion.

After reading the documentation, of mime_header_encode(), I concluded that in no occasion would the addslashes() call be needed, so I didn't use that.

Committed to git.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.