I'm using Postsubscribe module. I've set up the sender e-mail address like somebody@web.cz but the recipient got it from really strange address - =?UTF-8?B?IkphbsOtxI1layBkZXNpZ24iIDxqaXJpQGphbmljZWstZGVzaWduLmN6Pg==?=@token.onebit.cz

Can you give me a hint where could be the problem. Could it be problem of my host provider or where should I start? I haven't found such a issue so I'm asking for some help, thanks.

Anyway thanks for your great module.

Comments

ptaff’s picture

According to this: http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail...

The e-mail address should be encoded prior to being fed to drupal_mail().

In postsubscribe.module, change (around line number 840) this line:

$from = isset($mail->from_name) ? '"'. addslashes($mail->from_name) .'" <'. $from_email .'>' : $from_email;

To:

$from = isset($mail->from_name) ? '"'. addslashes(mime_header_encode($mail->from_name)) .'" <'. $from_email .'>' : $from_email;

That fixed the problem where using accents in the From field gave gibberish.

I'm not using the mimemail module, this one-line patch might not be needed if you're using it.