[Zope] Mail Host Problem

Eric Walstad eric@walstads.net
Mon, 16 Jul 2001 11:09:59 -0700


Chris,
I remember reading about having to remove all the leading white space from
within the <dtml-sendmail> tag:
> Code:
> <dtml-var standard_html_header>
> <dtml-sendmail mailhost="MailHost">
> To: chrisabruce@yahoo.com
> From: doug@sleeter.com
> Subject: Test
>
>       Dear Chris,
>
>       You order number test is ready.
>       Please pick it up at your soonest convenience.
> </dtml-sendmail>
> <dtml-var standard_html_footer>

I don't recall if it this just applies to the email header info or if you
have to remove the leading spaces in the message body, too.  Pretty weird,
huh?  The mailing list archives probably give a good explanation.

Hope that helps,

Eric.

> -----Original Message-----
> From: Bruce, Chris [mailto:Chris.Bruce@WorldChain.com]
> Sent: Monday, July 16, 2001 10:50 AM
> To: Bruce, Chris; 'eric@walstads.net'; zope@zope.org
> Subject: RE: [Zope] Mail Host Problem
>
>
> It works if I use the attributes of the dtml-sendmail to set to and from,
> but not if I put it in the message?
>
>
> -----Original Message-----
> From: Bruce, Chris
> Sent: Monday, July 16, 2001 10:45 AM
> To: 'eric@walstads.net'; zope@zope.org
> Subject: RE: [Zope] Mail Host Problem
>
>
> Code:
> <dtml-var standard_html_header>
> <dtml-sendmail mailhost="MailHost">
>       To: chrisabruce@yahoo.com
>       From: doug@sleeter.com
>       Subject: Test
>
>       Dear Chris,
>
>       You order number test is ready.
>       Please pick it up at your soonest convenience.
> </dtml-sendmail>
> <dtml-var standard_html_footer>
>
> Trace:
> Traceback (innermost last):
>   File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 223, in
> publish_module
>   File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 187, in
> publish
>   File /usr/local/www/Zope/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
>     (Object: Traversable)
>   File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 171, in
> publish
>   File /usr/local/www/Zope/lib/python/ZPublisher/mapply.py, line 160, in
> mapply
>     (Object: sendMailTest)
>   File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 112, in
> call_object
>     (Object: sendMailTest)
>   File /usr/local/www/Zope/lib/python/OFS/DTMLMethod.py, line 189, in
> __call__
>     (Object: sendMailTest)
>   File /usr/local/www/Zope/lib/python/DocumentTemplate/DT_String.py, line
> 540, in __call__
>     (Object: sendMailTest)
>   File
> /usr/local/www/Zope/lib/python/Products/MailHost/SendMailTag.py, line
> 189, in render
>     (Object: MailHost)
>   File /usr/local/www/Zope/lib/python/Products/MailHost/MailHost.py, line
> 222, in send
>     (Object: MailHost)
>   File /usr/local/lib/python2.0/smtplib.py, line 473, in sendmail
>   File /usr/local/lib/python2.0/smtplib.py, line 355, in mail
>   File /usr/local/lib/python2.0/smtplib.py, line 118, in quoteaddr
>   File /usr/local/lib/python2.0/rfc822.py, line 477, in parseaddr
>   File /usr/local/lib/python2.0/rfc822.py, line 522, in getaddrlist
>   File /usr/local/lib/python2.0/rfc822.py, line 530, in getaddress
>   File /usr/local/lib/python2.0/rfc822.py, line 510, in gotonext
> TypeError: (see above)
>
>
> -----Original Message-----
> From: Eric Walstad [mailto:eric@walstads.net]
> Sent: Monday, July 16, 2001 9:12 AM
> To: Chris Bruce; zope@zope.org
> Subject: RE: [Zope] Mail Host Problem
>
>
> Hi Chris,
>
> Unless someone has already answered your question, can you post your whole
> traceback for this error?  Also, seeing the code that generated the error
> would be helpful.
>
> Eric.
>
> > -----Original Message-----
> > I am getting the following error when trying to send mail:
> >
> > Error Type: TypeError
> > Error Value: len() of unsized object
> >
> >
> > The sendmail tag and the mailhost look correct.  I am hoping that this
> > error is just something I misconfigured. Any ideas?
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
> ------------------------------------------------------------------
> --------
> Note:  The information contained in this message may be privileged and
> confidential and protected from disclosure. If the reader of this
> message is
> not the intended recipient, or an employee or agent responsible for
> delivering this message to the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this communication is
> strictly prohibited. If you have received this communication in error,
> please notify us immediately by replying to the message and
> deleting it from
> your computer. Thank you.
> --------------------------------------------------------------------------
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
> ------------------------------------------------------------------
> --------
> Note:  The information contained in this message may be privileged and
> confidential and protected from disclosure. If the reader of this
> message is
> not the intended recipient, or an employee or agent responsible for
> delivering this message to the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this communication is
> strictly prohibited. If you have received this communication in error,
> please notify us immediately by replying to the message and
> deleting it from
> your computer. Thank you.
> ------------------------------------------------------------------
> --------