Sending two or more different emails after form submission

Author Message

Espen R

Tuesday 09 December 2008 12:49:05 pm

How can I make so that 2 different emails are sent after a user submits a form?

Both will use variables from the input. One is the order confirmation email to the user and the other is the actual order. I would like these to have different formating.

Christian Rößler

Monday 15 December 2008 9:02:19 am

Espen,

have you managed to get this working?
I'm currently in the exact same situation and would like to know if you had any success...

cheers,
Christian

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

source pixel

Monday 15 December 2008 10:40:54 am

Hello
Maybe this help

1. add two email attribute to "form class" (id of the attribute "email_one", "email_two")
2. override the template "/content/collectedinfomail/form.tpl" and then add this code

send to first email
{set-block scope=root variable=email_receiver}{$object.data_map.email_one.content}{/set-block}

send to second email
{append-block scope=root variable=email_cc_receivers}{$object.data_map.email_two.content}{/append-block}

<b>Or without class change</b>
1. override the template "/content/collectedinfomail/form.tpl" and then add this code

{set-block scope=root variable=email_receiver}[email protected]{/set-block}

send to second email
{append-block scope=root variable=email_cc_receivers}[email protected]{/append-block}

Ben Ryan

Monday 15 December 2008 3:17:55 pm

The above code doesn't do what Espen was after. I believe you are still sending the exact same email to two different people (using to and CC). But Espen is after a template for each email. So both emails have different contents in it. I'm after the same functionality.

Does anyone know how to do this, apart from writing your own extension.

Cheers

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.