Closed (fixed)
Project:
Webform
Version:
6.x-2.6
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 May 2009 at 17:01 UTC
Updated:
21 Dec 2009 at 07:49 UTC
quicksketch,
I have themed the email message sent to the person filling out the webform as well as myself as confirmation. I am adding a little session information to the message but it is being sent to just the person filling out the form. I don't see the same email message as the client. I am clearing the added session data at the end of the theme.
As I see it, one of two things are happening:
1. only the email address in the "Conditional e-mail recipients" is themed.
2. more than one email is sent. Thus my session data is unset().
Can you please confirm how the messages are generated and as to why I am not receiving the same email as the person filling out the webform?
thanks
g
Comments
Comment #1
quicksketchAll the e-mails are run individually through the webform-mail.tpl.php file, though I'm not sure about which order they are run. So if Webform sends 4 e-mails, the code in webform-mail.tpl.php will be run 4 times. You can ensure that code is only executed certain recipients by checking the $cid variable, which is the Component ID of the field that contains the entered e-mail. For the "main" e-mail address (the one that's not a conditional recipient), the $cid will be 0.
Comment #2
gwlangie commentedThank you. This is what I thought was happening. I will find a way to work around it.
Comment #3
gwlangie commentedquicksketch,
I am looking into this and I now have a question. The $form_values array contains the email information that the user completes via the form.
My question is in regards to the section "Web mail Settings" --> "E-mail to address:". This an edit box where you can have a list of email addresses separated by a comma. How can I get to those values?
Comment #4
quicksketchThose values will be saved in $node->webform['email'] I believe.
Comment #5
quicksketch