change the fucntion : function simplenews_set_from(&$mail, $tid = NULL) :
$mail->from_name = variable_get('simplenews_from_name_'. $tid, $name_default);
to
$mail->from_name = mime_header_encode(variable_get('simplenews_from_name_'. $tid, $name_default));
and
$mail->from_name = variable_get('simplenews_from_name', $name_default);
to
$mail->from_name = mime_header_encode(variable_get('simplenews_from_name', $name_default));
Comments
Comment #1
sutharsan commentedComment #2
miro_dietikerCheckout drupal core function:
http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail...
http://api.drupal.org/api/drupal/includes--unicode.inc/function/mime_hea...
If not using mimemail or some alternative drupal_mail_wrapper, drupal itself encodes the headers in the sending process drupal_mail_send. Thus a mail wrapper module needs to encode it correctly by itself.
With this API definition / function i consider it wrong to encode parts before. It looks to me, simplenews does it perfectly right. Am i wrong?
Comment #3
miro_dietikerMimemail for example does header encoding in:
drupal_mail_wrapper -> mimemail -> mimemail_mailengine -> mime_header_encode
Encoding is also done by:
mimemail_rfc_headers
mimemail_address -> mime_header_encode
mimemail_headers -> mime_header_encode
However we might hit a ToDo in mimemail_address - if addresses get input as a string.
Comment #4
simon georges commentedNo answer to this, I agree to close it now.
Reopen if you can bring something new to the discussion.