How do I change what is sent to the person who submits the webform?
Currently it contains a link to where they can "see" the submission but due to permissions they cannot see it. And I do not want them to see it because it would mean that anyone can see it.

Anyway, I want to change the email that is sent out. How do I do this?

Comments

rahulbile’s picture

I am also searching for the same...
any help is appreciated .....

rahulbile’s picture

Hey i got it working.

you can refer : http://www.impossible.co.in/drupal/webform

When u add a email field, do not check the " E-mail a submission copy " checkbox.
Instead in the webform form settings i'e " Webform advanced settings -> Additional Processing: " add the below code.
in $to, we get the email address of the email field, filled by the user.

Code :


$message    = "\r\n".' your message ' ;
    
$to               =  $form[submitted][email]['#value'];    //here email is the name of ur email field
$subject       = 'Download';
$headers     = 'From:impossible<info@impossible.co.in> '. "\r\n" .
                        'Reply-To: info@impossible.co.in' . "\r\n" .
                        'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);

and u r done. This is how we can send the customized email to the submitter.

Rahul Bile
http://www.impossible.co.in

annalina614’s picture

AWESOME! Thanks :-D
Now my only question is how do I turn off the default email to the submitter without altering the email to my employees?

rahulbile’s picture

I have used the same in one of my project and seems to be working fine.
Regarding ur query, as i have written before

"When u add a email field, do not check the " E-mail a submission copy " checkbox. in settings "

Due to this no mail will be send to the submitter.

elijah lynn’s picture

I am having trouble getting this to work. The name of my field is in fact "email", I changed the from, reply-to and subject parts but it isn't sending me a version of the form submission. Anything else I am doing wrong?

rahulbile’s picture

hello elijah,

The email is the key of the email field in the advance settings of the field. Let me know if it works for you.

quicksketch’s picture

Category: task » support
Status: Active » Closed (fixed)

Thanks for your help rahul.bile. I'd like to note that the 3.x version of Webform has per-email templates built into the interface which should help with this problem in the future.

I'm closing this issue as it seems to be resolved.