[Zope] MailHost - No message recipients designated

Justin Dunsworth 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:

<dtml-sendmail mailhost="testmail">
To: test at test.org
From: Test Email <test2 at test.org>
Subject: Testing
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<dtml-in "testSQL.Test_SQL_Method(_.None,_)">
  <dtml-var testSQLVar missing="" null="">
</dtml-in>

</dtml-sendmail>

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,
             encode=None, immediate=True):
        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.

Thanks, JD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.zope.org/pipermail/zope/attachments/20141009/b8779c15/attachment.html>


More information about the Zope mailing list