The following line, at about line 368

user_mail($account->mail, $edit['mailsubject'], $edit['mailbody'], "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from");

doesn't pick up $from because $from is not set in the code. I added the following line:

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

at line 363

Also, I'm using PHP Mailer and it automatically sticks the "From:" header in for you, so I also changed the line at 368 from the above to the following:

 user_mail($account->mail, $edit['mailsubject'], $edit['mailbody'], "Reply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from");

Hope this helps somebody.

Comments

Mojah’s picture

Assigned: Unassigned » Mojah
Status: Active » Fixed

Thanks for that.

CVS version updated. Commented lines added for php mailer users. Line 782 also calls the Drupal mail component, so you may want to remove the comments there also if using php mailer or other mail application.

Anonymous’s picture

Status: Fixed » Closed (fixed)