[Zope] Re: Bug in sendmail tag?

Maik Jablonski maik.jablonski@uni-bielefeld.de
Mon, 07 Oct 2002 13:35:34 +0200


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.

cheers, maik
-- 
Maik Jablonski                 __o
www.zfl.uni-bielefeld.de     _ \<_    Deutsche Zope User Group
Bielefeld, Germany          (_)/(_)               www.dzug.org