I am trying to build a multi enquiry form i which the same message plus some custom data is sent to multiple email addresses.
The email addresses and custom data are retrieved from existing entries.
My strategy so far has been to create the form like so; (the {exp:remember_me} tag simply provides a pipe delimited list of entry IDs - this bit works fine.
{exp:postmaster:email_form:open
action="/favourites/enquiry"
method="post"
field="email"
data_field="data"
}
{exp:channel:entries channel="properties" entry_id="{exp:remember_me:get}" parse="inward"}
<input type="text" name="email[entry_id]" value="{email}" />
<input type="test" name="data[entry_id][to_name]" value="{author}" />
<input type="text" name="data[entry_id][property-ref]" value="{property-ref}" />
<input type="text" name="data[entry_id][title]" value="{title}" />
{/exp:channel:entries}
<p><label for="name">Name</label><input class="text" type="text" name="from_name" value="" id="name"></p>
<p><label for="phone1">Telephone</label><input class="text" type="text" name="from_phone1" id="phone1"></p>
<p><label for="email">Email<span class="req">*</span></label><input type="text" name="from_email" value="" id="email"></p>
<p><label for="date_from">Date from</label><input class="datepicker" type="text" name="date_from" id="date_from"> <label for="date_to">Date to</label><input class="datepicker" type="text" name="date_to" id="date_to"></p>
<p><label for="number_in_group">Number in your group</label><input type="text" name="number_in_group" id="number_in_group"></p>
<p><label for="message">Message<span class="req">*</span></label><textarea name="message" id="message" value="" rows="12" cols="40"></textarea></p>
<button type="submit">Submit</button>
{/exp:postmaster:email_form:open}
This certainly triggers an email for each entry but I can only get them to send if I hardcode a recipient email address into the hook set up and I need to use the email field from each entry.
In addition I am also unable to include any of the custom data or form data within the emails. As I understand the documentation I believe I simply need to do something like this;
<table cellpadding="4" border="0">
<tr>
<td colspan="2"><b>Property enquiry from Big Holiday House</b></td>
</tr>
<tr><td><b>From</b></td><td>{from_name}</td></tr>
<tr><td><b>Email</b></td><td>{from_email}</td></tr>
<tr><td><b>Phone</b></td><td>{from_phone1}</td></tr>
<tr><td><b>Property Ref</b></td><td>{property_ref}</td></tr>
<tr><td><b>Property</b></td><td>{property_name}</td></tr>
<tr><td><b>No. in group</b></td><td>{number_in_group}</td></tr>
<tr><td><b>Date from</b></td><td>{date_from}</td></tr>
<tr><td><b>Date to</b></td><td>{date_to}</td></tr>
<tr><td valign="top"><b>Message</b></td><td>{message}</td></tr>
</table>
However, none of the tags get parsed - I just get the tag names in the email received.
I'm clearly really doing something wrong here and not understanding some fundamental aspect of using Postmaster.
How do I do it?