MailHost overrides explicitly set 'From' header in the message text.
Bug #965178 reported by
Taras Melnychuk
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Invalid
|
Low
|
Unassigned |
Bug Description
Zope MailHost overrides explicitly set 'From' header in the message text.
summary: |
- MailHost overrides explicitly set 'From' header in the messageText + MailHost overrides explicitly set 'From' header in the message text. |
To post a comment you must log in.
The attached patch is not perfect as it breaks testSendMessage Object( ) in line 447. See http:// zope3.pov. lt/trac/ browser/ Products. MailHost/ trunk/src/ Products/ MailHost/ tests/testMailH ost.py? rev=116940# L447.
Unfortunately MailHost.send utilizes _mungeHeaders that has following annotation regarding the From header mungling:
# XXX: do we really want to override an explicitly set From
I.e. at the moment there is no way to setup SMTP envelope different from message headers.
Should we offer extra keyword argument to send(), or completely alternative send2() that will offer the functionality.
If patch applied AS IS it can break some code that relied on rewritten header.
Note that the patch will add From header in the case e-mail missed it. But it won't overwrite one that there already was. This is the case that the patch is aiming to: Ability to have different e-mails in envelope and in email headers.