[Zope] Sendmail examples

Marcus Mendes mvmendes@emdata.com.br
Tue, 02 Jan 2001 16:01:41 +0000


steve smith wrote:
> 
> Anyone have any good, real-world examples using DTML-Sendmail tags? Would
> especially appreciate examples integrating SQL queries.
> 
> Ta!
> 
> Steve
> 
> _______________________________________________
> 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 )


Hello,

I've an example here. I'm using sql to find and check passwd/user. If
this sql_check_passwd is true, i'll find in another table, the user's
e_mail. Then i'll send an e-mail for him.

Here is:


      <dtml-in sql_check_passwd>
         <dtml-in sql_find_e_mail>      
           <dtml-if "code == _['sequence-item'].code_table"> 
            
     
<dtml-sendmail mailhost=MailHost>
to: <dtml-var e_mail>
from: xxxyyy@xxxyyy.com
subject: <dtml-var subject>

->> here, you put the message

</dtml-sendmail>
<script>alert("Your message was send successfully")</script>
<br>

          
            </dtml-if cod_pesq> 
                    
          </dtml-in sql_find_e_email>

        <dtml-else>
          <script>alert("User/Passwd incorrect.")</script>
        </dtml-in sql_check_passwd>

[]'s


Marcus Mendes