Bug: email messages to moderators sent by Antispam lack Content-Type/From headers. If language different from English is used, the message will most probably look garbled. Also, 'From' field is also NOT set.

Suggestions:
- add 'From' field to the message, take the site's default email address for that purpose
- add 'Content-Type: text/plain; charset=utf-8' header by default

I had to patch the antispam.module file myself to handle this on my sites.

1. Locate comment '// Send e-mails.'
2. Add to now empty 'headers' array both required fields

Comments

agileware’s picture

@Konstantin Boyandin are you able to post the patch you created to fix these problems?

JohnMc’s picture

Try this...

before the line containing // Send e-mails add:

$from = variable_get('site_mail', ini_get('sendmail_from'));

Then modify the empty headers array to contain a from value as follows:

'headers' => array('from'=>$from),

hth

Konstantin Boyandin’s picture

Of course

--- antispam.module	(original)
+++ antispam.module	(patched)
@@ -1384,7 +1384,10 @@
       'to' => $email_to,
       'subject' => $message_title,
       'body' => str_replace('@user-name', check_plain($moderators[$uid]['name']), $message_body),
-      'headers' => array(),
+      'headers' => array(
+        'Content-Type' =>  'text/plain; charset=utf-8',
+        'From' => variable_get('site_mail', ini_get('sendmail_from'))
+      ),
     );
     $ret = drupal_mail_send($message);
     if ($ret == FALSE) {
avpaderno’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, since Drupal 4.x, 5.x, and 6.x are now not supported.