[Zope] MailHost - No message recipients designated
justin.dunsworth at gmail.com
Fri Oct 10 00:03:02 CEST 2014
I've run into an issue with MailHost returning a "No message recipients
designated" exception on an older Zope server that I've never seen before
and I can't quite figure out.
I created a simple SendMail template that looks similar to:
To: test at test.org
From: Test Email <test2 at test.org>
Content-Type: text/html; charset=utf-8
<dtml-var testSQLVar missing="" null="">
The SQL method will pull a simple string from a table with Latin1 encoding,
however, always excepts with "No message recipients designated". If I
replace it with just a dash or nothing at all it will send the mail just
fine. After researching I believed this had to do with the encoding so I've
played around with different values (7bit, none, base64, quoted-printable,
etc) and they all send except what I have above.
I looked through MailHost.py and was able to change the send function to:
def send(self, messageText, mto=None, mfrom=None, subject=None,
messageText, mto, mfrom = messageText, 'me at test.org','test at test.org'
#_mungeHeaders( messageText, mto, mfrom, subject)
messageText = _encode(messageText, encode)
self._send(mfrom, mto, messageText, immediate)
Note the commenting of _mungeHeaders() - this, in turn, sent just fine. I
just can't figure out why, out of the blue with no change in the method of
how this was created, that this one fails with seemingly fine data.
This server is running Zope 2.11.4 (win32) with a MySQL 5.1.40 connected
through ZMySQLDA 3.1.1
Any help is appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Zope