Could you wrap the whole thing in an dtml-if: <dtml-if showagendaitem> you mail code here </dtml-if> Dan Edwin Martin wrote:
I have an e-mail list and I want to regularly send agenda-items.
But I don't want to send anything when there are no items.
I can't find a way to do that.
See my script at the bottom of the page.
mailing_sqlselectactief selects all e-mail addresses and some variables (soort and regio) which makes a selection from the agenda.
mailing_sqlverstuur uses soort and regio to select agenda items
I have to do <dtml-call>, otherwise the script won't work (weird!)
What can I do to send the list *only* when there is a list?
I tried putting <dtml-sendmail mailhost="MailHost"> inside the <dtml-if sequence-start>, but that's not possible.
<dtml-in mailing_sqlselectactief> <dtml-call "REQUEST.set('soort',soort)"> <dtml-call "REQUEST.set('regio',regio)"> <dtml-in mailing_sqlverstuur> <dtml-if sequence-start> To: <dtml-var email> From: x Subject: x
</dtml-if>
---- <dtml-var showagendaitem>
</dtml-in> </dtml-in>
_______________________________________________ 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 )