[Zope] Iterating inside Sendmail

Michael michael@nichestaffing.com
Thu, 21 Nov 2002 13:38:30 -0700


I have put up a small job site for Linux jobs here in N. Colorado.  I want to 
offer the option of entering an email address and have job postings emailed 
directly to subscribers as they are posted.  I tried the example below, but 
there seems to be a problem iterating inside sendmail.

For the time being, I just created a method and manually entered all the 
email addresses in it, ie: Bcc: <dtml-var listNames>, but I would like to 
automate it if possible.  Does anyone have any idea on how to approach this?

Michael


<dtml-with entries>

<dtml-call "REQUEST.set('post_name', post_name)">
<dtml-call "REQUEST.set('post_type', post_type)">
<dtml-call "REQUEST.set('post_email', post_email)">
<dtml-call "REQUEST.set('description', description)">
<dtml-call "REQUEST.set('company_name', company_name)">
<dtml-call "REQUEST.set('company_domain', company_domain)">
<dtml-call "REQUEST.set('position_title', position_title)">
<dtml-call "REQUEST.set('org_city', org_city)">
<dtml-call "REQUEST.set('title', post_name+' - '+post_type+' - 
'+position_title)">

<dtml-with "manage_addProduct['NCLJobs']">
<dtml-call "ncl_jobs_entry_add(_.None, _, NoRedir=1)">
</dtml-with>
</dtml-with>

<dtml-sendmail mailhost="MailHost">
To: linux@jymis.com
From: linux-jobs@jymis.com
Bcc: 
<dtml-with listEntries>
<dtml-in Catalog>
<dtml-var email_address>
</dtml-in>
</dtml-with>
Subject: Northern Colorado Linux Jobs Autoresponder
<dtml-mime type=text/plain encode=7bit>
POSTING TYPE: <dtml-var post_type>
COMPANY NAME: <dtml-var company_name>
COMPANY DOMAIN: <dtml-var company_domain>
CONTACT EMAIL: <dtml-var post_email>
POSITION TITLE: <dtml-var position_title>
LOCATION / CITY: <dtml-var org_city>

DESCRIPTION: <dtml-var description>
</dtml-mime>
</dtml-sendmail>