<![CDATA[ email notification based on user input - My Forums]]> https://forums.modx.com/thread/?thread=46464 <![CDATA[email notification based on user input]]> https://forums.modx.com/thread/46464/email-notification-based-on-user-input#dis-post-268960
I’m building a "wishlist" email form where the intended recipients are those that are filled out in the "senders form" or form that the customer is filling out.

Somehow I need to pass in the email addresses AFTER the form has submitted.

Right now, instead of replacing these fields with real email addresses, it tries to send them to [+requestEmail2+], [+requestEmail3+], etc...

How do I make it so it parses those variable holders so it actually sends to a real email address?

controller...
[[eForm?
&subject=`Your friend sent you their wishlist!`
&formid=`wishListSendersForm`
&ccsender=`1`
&to=`[+requestEmail1+]`
&bcc=`[+requestEmail2+],[+requestEmail3+],[+requestEmail4+],[+requestEmail5+]`
&autosender=`[email protected]`
&tpl=`WISHLIST_sendersform`
&report=`WISHLIST_recipients_receivers_form`
&gotoid=`196`
&sendAsHtml
!]]

tpl or "WISHLIST_sendersform" template: (Not the whole thing, just the pertinent part)

<table><tr>
<td><span class=’t10’><b>Name</b></span></td><td><span class=’t10’><b>Email</b></span></td>
</tr><tr>
<td><input type="text" name="requestName1" class="input" value=""></td>
<td><input type="text" name="requestEmail1" class="input" value="" size="35"></td>
</tr><tr>
<td><input type="text" name="requestName2" class="input" value=""></td>
<td><input type="text" name="requestEmail2" class="input" value="" size="35"></td>
</tr><tr>
<td><input type="text" name="requestName3" class="input" value=""></td>
<td><input type="text" name="requestEmail3" class="input" value="" size="35"></td>
</tr><tr>
<td><input type="text" name="requestName4" class="input" value=""></td>
<td><input type="text" name="requestEmail4" class="input" value="" size="35"></td>
</tr><tr>
<td><input type="text" name="requestName5" class="input" value=""></td>
<td><input type="text" name="requestEmail5" class="input" value="" size="35"></td>
</tr>
</table>]]>
swiftouch Dec 22, 2008, 03:47 PM https://forums.modx.com/thread/46464/email-notification-based-on-user-input#dis-post-268960