Closed (fixed)
Project:
SMTP Authentication Support
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Jan 2007 at 13:27 UTC
Updated:
31 Jan 2007 at 16:01 UTC
What is the problem and how to fix it?
If the headers are not set, user_mail_wrapper initializes $from_name using site's 'site_name' variable. Unfortunately it forgets to pick up 'site_mail' which leads to corrupted "FROM" setting in the received email.
Solution is simple, use this code for seting default email (added one line only):
if (variable_get('smtp_fromname', '') != ''){
$from_name = variable_get('smtp_fromname', '');
}
else{
$from = variable_get('site_mail', '');
$from_name = variable_get('site_name', '');
}
Perhaps $from should also be populated on IF == TRUE, but I am not sure how write the parser...
Comments
Comment #1
LukeLast commentedI can see how that could be a problem. I updated the latest version of SMTP 4.7 to use the site_mail value when a from address isn't given in the header.
Comment #2
(not verified) commented