[ZCM] [ZC] 2063/ 3 Comment "Attribute error in MailHost/sendTemplate"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri Apr 7 04:55:04 EDT 2006


Issue #2063 Update (Comment) "Attribute error in MailHost/sendTemplate"
 Status Pending, Zope/bug+solution low
To followup, visit:
  http://www.zope.org/Collectors/Zope/2063

==============================================================
= Comment - Entry #3 by pdeoliveira on Apr 7, 2006 4:55 am

The attribute error occurs when you call sendTemplate().

In sendTemplate, the current object is called "trueself" and "self" is the "calling object" (this naming is a bit confusing). So, the syntax : self._send() tries to call a _send() method of the calling object, and this method doesn't exist. The correct syntax is "trueself._send()", as _send() is a method of MailHost.

________________________________________
= Comment - Entry #2 by ajung on Apr 7, 2006 4:44 am

MailHost *does* provide a _send() method so I don't see a problem.
Provide a reproducable description or testcase that shows the
problem.
________________________________________
= Request - Entry #1 by pdeoliveira on Apr 7, 2006 4:36 am

MailHost.sendTemplate creates an attribute error for value : "_send".
Solution : 
In MailHost.py / sendTemplate(...) , replace :
self._send(mfrom, mto, messageText)
with
trueself._send(mfrom, mto, messageText)

==============================================================



More information about the Zope-Collector-Monitor mailing list