[zope2-tracker] [Bug 965178] Re: MailHost overrides explicitly set 'From' header in the message text.

Myroslav Opyr myroslav at quintagroup.com
Tue Mar 27 12:40:16 UTC 2012


The attached patch is not perfect as it breaks testSendMessageObject()
in line 447. See
http://zope3.pov.lt/trac/browser/Products.MailHost/trunk/src/Products/MailHost/tests/testMailHost.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.

-- 
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.
https://bugs.launchpad.net/bugs/965178

Title:
  MailHost overrides explicitly set 'From' header in the message text.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zope2/+bug/965178/+subscriptions


More information about the zope2-tracker mailing list