[Zope-dev] Easy DTML question -- ha, ha!!!!!

Jim Sanford jsanford@atinucleus.com
Thu, 18 Nov 1999 08:58:04 -0600


This works. It is in use now where I work to automatically notify users when
there are orders that need their attention.

_______dtml method: AutoMail_________________
<dtml-sendmail mailhost="WorkMailHost">
To: <dtml-var m_to>
From: <dtml-var m_from>
Subject: <dtml-var m_subj>

<dtml-var m_body>

</dtml-sendmail>
_______________________________

___test dtml document that calls the AutoMail method_________
<!--#var standard_html_header-->
<h2><!--#var title_or_id--></h2>
<p>
This is the <!--#var id--> Document.
</p>
<dtml-call "REQUEST.set('m_to','user@work.com')">
<dtml-call "REQUEST.set('m_from','automailer@work.com')">
<dtml-call "REQUEST.set('m_subj','Order Notification')">
<dtml-let tmpbod="''ND office submitted new order.' + _.chr(10)+_.chr(10)"

tmpbod="tmpbod+'https://machine.work.com/Orders/EOrder?order_id=ND124900'"
               tmpbod="tmpbod+_.chr(10)+_.chr(10)+'**This is an auto
generated notice. NO REPLY IS NEEDED**'">
<dtml-call "REQUEST.set('m_body',tmpbod)">
</dtml-let>
<dtml-call AutoMail>
<!--#var standard_html_footer-->
__________________________________________________
----- Original Message -----
From: John Fohrman <fohrman@mediaone.net>
To: Arpad Kiss <sekter@mail.matav.hu>; <zope-dev@zope.org>
Sent: Thursday, November 18, 1999 6:47 AM
Subject: RE: [Zope-dev] Easy DTML question -- ha, ha!!!!!


> > Hi,
> > dtml-let may be another solution in this case(not tested, but it should
> > work):
> >
> > <dtml-let smtp_email="'smtp:'+email">
> > ...
> > </dtml-let>
> >
> > Arpad Kiss
> >
>
>
> Thanks for the suggestions. Apparently, none of these work however.  The
> sendmail command apparently doesn't accept any variables inside the tag.
>
> Unfortunatley, this messes us up here, because the mail server won't send
> without the address specified within the tag. Not too useful!
>
>
>
>
>
>
>
> > ----- Original Message -----
> > From: Hannu Krosing <hannu@tm.ee>
> > To: John Fohrman <fohrman@mediaone.net>; <zope-dev@zope.org>
> > Sent: Thursday, November 18, 1999 10:16 AM
> > Subject: Re: [Zope-dev] Easy DTML question
> >
> >
> > > John Fohrman wrote:
> > > >
> > > > Thanks for your response. Yes, it works with a fixed string,
> > that is why
> > I'm
> > > > trying to do that.
> > >
> > > try something like
> > >
> > > <!--#call "REQUEST.set('smtp_email','smtp:'+email)"-->
> > >
> > >  <!--#sendmail mailhost=MailHost
> > >    mailfrom=sender
> > >    mailto=smtp_email -->
> > >
> > > It _may_ be the same thing I encountered when setting cookies (in ver
> > 1.0.3,
> > > not sure it is still in 2.x), namely that in some places
> > variables are not
> > > evaluated
> > >
> > > In my case I had a rcursive loop that constructed a path from SQL
> > database,
> > > and
> > > when setting a cookie with
> > >
> > > RESPONSE.setCookie('path',make_path) the source code of the
> > method was set
> > in
> > > the
> > > cookie resulting in broken page ;(
> > >
> > > using the trick with  REQUEST.set solved the problem
> > >
> > > ---------
> > > Hannu
> > >
> > > _______________________________________________
> > > Zope-Dev maillist  -  Zope-Dev@zope.org
> > > http://lists.zope.org/mailman/listinfo/zope-dev
> > >            No cross posts or HTML encoding!
> > > (Related lists -
> > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > >  http://lists.zope.org/mailman/listinfo/zope )
> > >
> > >
> >
> >
> > _______________________________________________
> > Zope-Dev maillist  -  Zope-Dev@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-dev
> >            No cross posts or HTML encoding!
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
> >
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
>            No cross posts or HTML encoding!
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>
>