[Zope] what's up with sendmail tag in standard_error_message?

marc lindahl marc@bowery.com
Thu, 31 May 2001 14:03:40 -0400


Strange, that seems to work!  Dunno what I did before, but now it's fixed.
Thanks Jens!

P.S. this is finally my code:

<dtml-sendmail mailhost="ErrorMailHost">
To: zope@bowery.com
From: Zope System Error Message <zope@<dtml-if
name="SERVER_NAME">&dtml-SERVER_NAME;</dtml-if>>
Subject:  [Zope Error]<dtml-if name="error_type"><dtml-var
name="error_type"><dtml-else>Unknown type</dtml-if>


Reported an error <dtml-if name="error_type">of type <dtml-var
name="error_type"> </dtml-if>for the following URL:

<dtml-var name="URL0">

<dtml-if name="REMOTE_HOST">
Requested by Host: <dtml-var name="REMOTE_HOST">
</dtml-if>

<dtml-if name="REMOTE_ADDR">
Requested by Address: <dtml-var name="REMOTE_ADDR">
</dtml-if>

<dtml-if name="HTTP_REFERER">
Linked from: <dtml-var name="HTTP_REFERER">
</dtml-if>

<dtml-if name="HTTP_USER_AGENT">
User Agent: <dtml-var name="HTTP_USER_AGENT">
</dtml-if>

 Request: 
 <dtml-in "REQUEST.items()" sort>
  <dtml-var sequence-key>: <dtml-var sequence-item>
 </dtml-in>
 
<dtml-if name="error_tb">
<dtml-var name="error_tb">
</dtml-if>
 
</dtml-sendmail>
 

> From: Jens Vagelpohl <jens@dataflake.org>
> Date: Wed, 30 May 2001 19:27:36 -0400
> To: marc lindahl <marc@bowery.com>, <zope@zope.org>
> Subject: Re: [Zope] what's up with sendmail tag in standard_error_message?
> 
> this setup works for me in my standard_error_message (on 2.3.2):
> 
> *************************************
> <dtml-sendmail smtphost="mail.dataflake.org">
> To: site_errors@dataflake.org
> From: Site Errors <webmaster@type4.org>
> Subject: [type4.org Error] <dtml-if name="error_type"><dtml-var
> name="error_type"><dtml-else>Oops</dtml-if>
> 
> Reported an error <dtml-if name="error_type">of type <dtml-var
> name="error_type"> </dtml-if>for the following URL:
> 
> <dtml-var name="URL0">
> 
> <dtml-if name="REMOTE_HOST">
> Requested by Host: <dtml-var name="REMOTE_HOST">
> </dtml-if>
> 
> <dtml-if name="REMOTE_ADDR">
> Requested by Address: <dtml-var name="REMOTE_ADDR">
> </dtml-if>
> 
> <dtml-if name="HTTP_REFERER">
> Linked from: <dtml-var name="HTTP_REFERER">
> </dtml-if>
> 
> <dtml-if name="error_tb">
> <dtml-var name="error_tb">
> </dtml-if>
> 
> </dtml-sendmail>
> *****************************************
> 
> jens
> 
> 
> "marc lindahl" <marc@bowery.com> had the following to say:
> 
>> Am I missing something?
>> I'm running 2.3.2, and simplifying standar_error_message down to this
>> doesn't even work.  I don't have ZDebug installed (anymore -- same thing
>> with or without ver 0.2.1):
>> 
>> 
>> <dtml-var standard_html_header>
>> 
>> <dtml-sendmail mailhost="ErrorMailHost" mailto="zope@bowery.com"
>> mailfrom="Zope System Error Message" subject="Zope Error Report">
>> 
>> 
>> There was an error.
>> 
>> </dtml-sendmail>
>> 
>> <dtml-var standard_html_footer>
>> 
>> 
>> I have a mailhost in the root dir called ErrorMailHost, and tried setting
>> it's security totally lax (anonymous can do anything), doesn't help...
>> 
>> if I don't have a sendmail tag in standard_error_message it works as
>> expected.  Can't believe it's not working... I'm sure plenty of people have
>> this setup!
>> 
>> 
>> _______________________________________________
>> 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 )
>> 
> 
> 
> _______________________________________________
> 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 )