When Antispam moderation emails are turned on, those emails are sent with a "from" address of the web server itself, rather than from the main Drupal address. For example, on my test server, moderation emails are being sent by:

Apache

while all other emails sent by Drupal use the name and address specified at admin/settings/site-information:

My Site

The latter would seem to be best practice.

Comments

gmark’s picture

Oops. The example above should read:

Apache <apache@dev.mysite.com>

vs

My Site <administrator@mysite.com>

with the former being the From address from Antispam e-mails, and the latter being the From address on other Drupal system e-mails.

agileware’s picture

Patch anyone?

JohnMc’s picture

Try this...

Within antispam.module, 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

avpaderno’s picture

Version: 6.x-1.0-beta2 » 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.