[ZCM] [ZC] 816/ 3 Comment "dtml-sendmail corrupts header is message is blank"
Collector: Zope Bugs, Features, and Patches ...
zope-coders-admin@zope.org
Sat, 22 Feb 2003 10:07:39 -0500
Issue #816 Update (Comment) "dtml-sendmail corrupts header is message is blank"
Status Pending, Zope/bug medium
To followup, visit:
http://collector.zope.org/Zope/816
==============================================================
= Comment - Entry #3 by mjablonski on Feb 22, 2003 10:07 am
The problem is in Zope/lib/python/Products/MailHost/MailHost.py. messageText is stripped, so the last header-line is "stripped of its newline." An lstrip() fixes the problem (only strip whitespace in front of header, leave all unchanged after the header).
173c173
< mfile=StringIO(messageText.strip())
---
> mfile=StringIO(messageText.lstrip())
________________________________________
= Comment - Entry #2 by ajung on Feb 21, 2003 1:06 pm
can you provide a patch?
________________________________________
= Request - Entry #1 by Anonymous User on Feb 20, 2003 4:29 pm
When using a dtml-sendmail and specifying To:, From:, and Subject:, if there is no message text after the blank line (or no blank line at all), Zope appends the Date: header to the Subject: header, e.g.,
"Subject: This is a testDate: February 21, 2003..."
Sending emails with only a subject and no message text is commonly used in sending commands to listservers.
==============================================================