Forum OpenACS Development: Re: How to Personalize bulk_mail

Collapse
Posted by Dave Bauer on
The API documentation for bulk_mail::new explains how it works:

You select all the columns you need in the SQL query passed into the query parameter. The column names will be available as variables for replacement in the message body.

-query (required)
    a query that must select the email address to send to as 'email' and can select any other values that will be interpolated into the subject and message of the bulk_mail for each recipient. if column 'foo' is selected it's value will be interpolated anywhere that '{foo}' appears in the subject or message of the bulk_mail. if columns 'from_addr', 'reply_to', 'subject', or 'message' are selected, their respective values will also become the 'from_addr', 'reply_to', 'subject', and 'message' on a per recipient basis.