In the function simplenews_mail_send the ' and " are escape with an addslashes. It obviously breaks the name where we have a ' and a ". I don't think that escaping is really needed here because mime_header_encode already encode all this. My suggestion is to simply remove the addslashes as follow. (Sorry I have no patch beacause I don't work on the CVS version). If need I can provide a patch against 1.0 (glups)

function simplenews_mail_send($mail) {
  $from_email = isset($mail->from_address) ? $mail->from_address : variable_get('site_mail', ini_get('sendmail_from'));
  $from = isset($mail->from_name) ? '"'. mime_header_encode($mail->from_name).'" <'. $from_email .'>' : $from_email;

Comments

cirotix’s picture

I meant a patch against 1.3

sutharsan’s picture

Status: Active » Postponed (maintainer needs more info)

Please describe what problems you have encountered.
See the original issue that made me add this piece of code to the module: http://drupal.org/node/238735 Please comment on this.

cirotix’s picture

mime_header_encode is prefectly fine.

The problem is with addslash. It will escape site name such as "L'avion" into "L\'avion". So the one who is receiving the message will get L\'avion as sender. Because your string is passed thru mime_header_encode, you don't need addslash any more.

sutharsan’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks for the explanation. Patch committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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