There still seems to be a problem with specifying the From address. In the Admin settings the guidance for the From address includes
If left blank, the from address entered in the form will be used as the from address for the email. Enter a valid email address here to override that.
But the code in the module falls-back to site_mail if forward_sender_address is empty, line 789
$from = variable_get('forward_sender_address', '');
if (empty($from)) {
$from = variable_get('site_mail', '');
}
The code should use the email address from the form:
$from = variable_get('forward_sender_address', '');
if (empty($from)) {
$from = $form_state['values']['email'];
}
If an email address is specified for forward_sender_address then the From header will be a bit confusing. It will show the name entered on the form but with an unrelated email address, e.g.
John Smith <admin@mywebsite.com>
Perhaps in this case the From header should not include the name but only have the email address?
Comment | File | Size | Author |
---|---|---|---|
#3 | forward_766724.patch | 1.21 KB | SofiaSund |
Comments
Comment #1
yang_yi_cn CreditAttribution: yang_yi_cn commentedany updates on this? I'm having the same problem
Comment #2
kerberos CreditAttribution: kerberos commentedI can confirm that this solves the issue. Can this be incorporated into the module code by the module maintainer?
-Daniel
DealFever
Comment #3
SofiaSund CreditAttribution: SofiaSund commentedI had the same issue in forward-7.x-1.0-alpha3. This patch solved the issue for me.
It includes the change that duncanc suggested, and I also changed the #default_value in line 211 (which used to look like this:
#default_value' => variable_get('forward_sender_address', variable_get('site_mail', '')),
) where I removed the 'site_mail' fallback. The code now looks like this:I hope it'll apply to the 6.x version as well!
Comment #4
drupalmeister CreditAttribution: drupalmeister commentedNot sure if this will help you with 'forward' but I found a module called 'return path' that might help you out.
Comment #5
miked CreditAttribution: miked commentedHad the same issue, found the bad code and made the same change as duncanc, fixed the problem. I believe this error warrants some attention. Our site is an active regional daily news publication. People frequently forward stories from the site. In some cases, the 'from' address ends up in the recipients address book under the forwarder's name. Consequently, when the person's name is used from the address book on future emails, the email winds up being sent to our site email instead of the intended recipient.
Note: problem has not been addressed in the 6.x-1.21 or in the 7.x-2.0 beta versions.
Comment #6
john.oltman CreditAttribution: john.oltman commentedSeems like a real problem, will take a look within the next few days
Comment #7
john.oltman CreditAttribution: john.oltman commentedTook a look, open to making the change suggested, but I am thinking the field help should be changed to match what the code is doing, instead of the other way around. Rationale:
* No regression needed for existing install base
* Sending from a random email address that doesn't match the sending domain might cause delivery issues
* I believe delivery rates improve by including a from-name in the header, so removing it isn't something I'd prefer
* The reply-to headers are set correctly so if you reply to the email, you reply to the sender's address and not the site info address
* If you forward, the "from" info becomes irrelevant - not sure how this would end up in someone's address book
I can see the case where someone has a rule that adds each "from" address for a received email to the address book. Otherwise I am not sure how an entry is added to the address book on a forward. If you can explain this then that may help me understand the proper solution.
@miked, let me know your thoughts and we'll go from there.
Comment #8
john.oltman CreditAttribution: john.oltman commentedComment #9
john.oltman CreditAttribution: john.oltman commentedComment #10
john.oltman CreditAttribution: john.oltman commentedComment #11
john.oltman CreditAttribution: john.oltman commentedThis was fixed in the Drupal 8/9 release.