[Zope] Re: Bug in sendmail tag?

Cornelis J. de Brabander brabander@fsw.LeidenUniv.nl
Mon, 07 Oct 2002 14:51:27 +0200


Hi Maik,

"Maik Jablonski" <maik.jablonski@uni-bielefeld.de> wrote in message
news:anrrl6$a0j$1@main.gmane.org...
> Cornelis J. de Brabander wrote:
> > Hi all,
> > I'm stuck with the following code. In zope 2.5.1 this code results in an
> > attribute error with error value 'sendall'. In zope 2.4.3 it works. I've
> > noticed there are differences in smtplib.py between the two versions.
But
> > the code I use is correct according two the DTML Reference. Is this a
bug?
> >
> > <dtml-sendmail mailhost="MailHost">
> > To: 'brabander@fsw.leidenuniv.nl'
> > From: 'brabander@fsw.leidenuniv.nl'
> > Subject: 'foo'
> >
> > bar
> > </dtml-sendmail>
> >
> > Traceback (innermost last):
> >   File E:\zope\251\lib\python\ZPublisher\Publish.py, line 150, in
> > publish_module
> >   File E:\zope\251\lib\python\ZPublisher\Publish.py, line 114, in
publish
> >   File E:\zope\251\lib\python\Zope\__init__.py, line 159, in
> > zpublisher_exception_hook
> >     (Object: mailtest)
> >   File E:\zope\251\lib\python\ZPublisher\Publish.py, line 98, in publish
> >   File E:\zope\251\lib\python\ZPublisher\mapply.py, line 88, in mapply
> >     (Object: Mailer)
> >   File E:\zope\251\lib\python\ZPublisher\Publish.py, line 39, in
call_object
> >     (Object: Mailer)
> >   File E:\zope\251\lib\python\OFS\DTMLMethod.py, line 127, in __call__
> >     (Object: Mailer)
> >   File E:\zope\251\lib\python\DocumentTemplate\DT_String.py, line 473,
in
> > __call__
> >     (Object: Mailer)
> >   File E:\zope\251\lib\python\Products\MailHost\SendMailTag.py, line
116, in
> > render
> >     (Object: MailHost)
> >   File E:\zope\251\lib\python\Products\MailHost\MailHost.py, line 156,
in
> > send
> >     (Object: MailHost)
> >   File E:\zope\251\lib\python\Products\MailHost\MailHost.py, line 201,
in
> > _send
> >     (Object: MailHost)
> >   File E:\zope\251\bin\lib\smtplib.py, line 466, in sendmail
> >   File E:\zope\251\bin\lib\smtplib.py, line 316, in ehlo
> >   File E:\zope\251\bin\lib\smtplib.py, line 247, in putcmd
> >   File E:\zope\251\bin\lib\smtplib.py, line 235, in send
> >   File <string>, line 1, in sendall
> > AttributeError: (see above)
>
> hi,
>
> your code works for me on 2.51 and 2.6-Head, but you should remove the
> quotes around your adresses and check your MailHost... the default
> 'localhost' doesn't work for me, while '127.0.0.1' does.
>
You were right about the quotes, so I removed them (actually I adapted the
code from a more complex situation). Furthermore I changed the mailhost
object to the actual IP-address and tried this both in 243 and 251. Works in
243, but fails in 251 with the same error and traceback (above).
I'm puzzled.
cb