Mollom alters all emails if any mollom_response info was generated in the request. This makes password recovery, new registration, etc. emails to include the "Report as inappropriate: ..." footer, which is quite misleading.
/**
* This function adds a 'report as inappropriate' link to the e-mails that are sent
* by the contact module.
*/
function mollom_mail_alter($key, $to, $subject, &$body, $from, $headers) {
$response = $GLOBALS['mollom_response'];
if (isset($response) && isset($response['session_id'])) {
$body .= "\n\n". t('Report as inappropriate: @link', array('@link' => url('mollom/contact/'. $response['session_id'], NULL, NULL, TRUE)));
}
}
The comment says, this is about to affect only contact emails, so mollom should filter $key to the contact emails as far as I see. Or if more emails are to be affected (eg. those sent by webform module), we need some way to control the mail keys to look at.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | mollom-key.patch | 793 bytes | toemaz |
Comments
Comment #1
toemaz commentedI'd like to report the same inconvenient behavior of the mollom module: it adds Report as inappropriate: http://www.mydomain.com/mollom/contact/xxxx to all outgoing registration emails of my website. This is indeed quite confusing and misleading for the user.
Comment #2
toemaz commentedI saw that the Drupal 6 version of the mollom module does check whether it is contact mail or not
so I went ahead and made a patch for the Drupal 5 release. Find it attached. All in all, a very minor tweak.
Comment #3
toemaz commentedPatch running in production for about 2 weeks now. No problems so far.
Comment #4
dries commentedI'm pretty sure this would break the mails for the per-user contact forms.
Comment #5
toemaz commentedIndeed it does break it. Perhaps this issue should be moved to 6.x-1.x-dev since I suspect it broken in the 6 release as well. A backport to 5 would be the best strategy.
Comment #6
dave reidDuplicate of #370369: Mollom attaches "Report as Inappropriate" message to system generated email which will be backported to D5.