Commit e524462a authored by Andreas Jung's avatar Andreas Jung

Collector #2289: leading \n\r inside messageText broke mail headers

parent 415a8342
......@@ -47,6 +47,9 @@ Zope Changes
- Collector #2287: fixed missing import of 'render_blocks' in
SendMailTag.py
- Collector #2289: leading \n\r inside messageText broke
mail headers
Zope 2.4 alpha 1
Features Added
......
......@@ -84,8 +84,8 @@
##############################################################################
"""SMTP mail objects
$Id: MailHost.py,v 1.61 2001/06/07 22:18:44 shane Exp $"""
__version__ = "$Revision: 1.61 $"[11:-2]
$Id: MailHost.py,v 1.62 2001/06/08 11:29:07 andreas Exp $"""
__version__ = "$Revision: 1.62 $"[11:-2]
from Globals import Persistent, DTMLFile, HTML, MessageDialog
from smtplib import SMTP
......@@ -204,6 +204,8 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
encode=None):
headers = extractheaders(messageText)
messageText = messageText.lstrip()
if not headers['subject']:
messageText="subject: %s\n\n%s" % (subject or '[No Subject]',
messageText)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment