Closed (fixed)
Project:
HTML Mail
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Anonymous (not verified)
Created:
24 May 2011 at 10:17 UTC
Updated:
3 Jun 2020 at 17:19 UTC
Jump to comment: Most recent
Comments
Comment #1
pillarsdotnet commentedThis change comes from the code in the following issue:
#209672: Use site name in From: header for system e-mails
If you have configured your site email address in
admin/settings/site-information, then that will be used as the default From address.If you have not configured your site email, but your server has set the sendmail_from configuration option, then that will be used.
I will update the module documentation, and roll a new release shortly. There have some other minor changes not directly related to your problem.
Comment #2
Anonymous (not verified) commentedThe site email address is configured. When I display it using $from variable in the HTML Mail template, the displayed value is correct.
In mail content, sender field is correct (equal to site configuration) but from value not.
I'll wait for the new release.
Comment #3
Anonymous (not verified) commentedI think I've found the problem ! It comes not from this module but from HTML Mail. So I will proceed to several tests before closing this ticket and open a new one in HTML Mail issues stack.
Comment #4
pillarsdotnet commentedYes, if there is a fix, it will be in HTML Mail.
Comment #5
pillarsdotnet commentedRolling a new release now. Here's the source of a test email I received using the d6 version:
Comment #6
pillarsdotnet commentedReleased HTML Mail 6.x-2.45 and Mail System 6.x-2.12.
If upgrading to these versions does not solve your problem, please re-open this issue.
Comment #7
Anonymous (not verified) commentedI think the last release of HTML Mail 6.x-2.45 does not solve the problem I found :
Here is the current code (htmlmail.mail.inc, from line 189) :
Using $headers['Return-Path'] is where the error is because $headers doesn't have key 'Return-Path' which is contained in $message variable. So you have to replace $headers['Return-Path'] by $message['Return-Path']. Then the correct code is :
Comment #8
Anonymous (not verified) commentedI've just tested : Released HTML Mail 6.x-2.45 and Mail System 6.x-2.12. The problem I have still occurs.
Applying #7 solve it !
Comment #9
Anonymous (not verified) commentedI forgot to reopen it...
Comment #10
pillarsdotnet commentedActually, the bug is the other way around. The Return-Path is set in
$headers, not in$message. Fromdrupal_mail(), starting at line 103 ofincludes/mail.inc:So the code in
htmlmail.mail.incshould be:Comment #11
pillarsdotnet commentedFixed in 6.x-2.46 release. Again, please re-open this issue if the fix doesn't work for you.
Comment #12
Anonymous (not verified) commentedThis is not the same variable $headers we are talking about. In htmlmail.mail.inc the $headers variable is created by function txtHeaders : htmlmail.mail.inc line 175 (in my case the local one and not the MailMIME class one). This function create a string which then is set to $headers.
That's is the cause of this problem : trying to access a key on a string variable.
Comment #13
pillarsdotnet commentedSo it should be
$message['headers']['Return-Path']then. Fixed in 6.x-2.47 release.Also renamed
$headersto$txt_headersin dev but haven't pushed that bit to a release yet.Thanks for your help; sorry it took me so long to understand.
Comment #14
Anonymous (not verified) commentedOk, it works well now ! Thank your for you celerity.