Hi
The reminder email subject line is only appearring as a ? or sometimes ??.
The code for the subject line seems a bit complex to me (but then all code is :-p) is there a way just to simplify it?
function remindme_mail($node) {
$from = variable_get('site_mail', ini_get('sendmail_from'));
$subject = variable_get('site_name', 'drupal') .' '. strtr(t('Reminder for »%title«'), array ('%title' => check_plain($node->title)));
$to = "$node->name <". $node->mail .'>';
$body = strtr(t("Greetings %name,\n\nYou wanted to get a reminder for the event %title. It starts at %time, you can see more details at %url . Thank you for using the Walkers Talk Remind Me! service."));
return user_mail($to, $subject, $body, "From: $from\nReply-to: $from\nX-Mailer: Drupal (remindme.module)\nReturn-path: <$from>\nErrors-to: $from\n");
}
Comments
Comment #1
Cromicon commentedLooking at the source of the email it seems to be something to do with utf8 to my untrained eye...
To: Admin
Subject: =?UTF-8?B?UmVtaW5kZXIgZm9yILtDb25pc3RvbiBPbGQgTWFuqw==?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-transfer-encoding: 8Bit
Is anyone else experiencing these problems?
Comment #2
Cromicon commentedOk this looks to be a fix. Note one the code example in my first post there are two "chevron" characters surrounding the first incidence of %title - I took them out so the code reads:
$subject = strtr(t('Reminder for %title'), array ('%title' => $node->title));And now the subject shows correctly in the email.
Comment #3
avpadernoI am closing this issue, since it's for a Drupal version that isn't supported.