This video will show you how to receive an email when your form is submitted. It will also show how you can send a copy to the user that submits the form.
Back in the "Webform" tab let's take a look in the "E-mails" sub-tab. In here we can send an email to an email address when the form is submitted.
- I will enter my email address into this field and click "Add"
- Now we have some options for this email. We can set the:
- Email subject
- Email from address
- And email from name
- I will set a custom from email address, and enter my email address.
Further down we have our "email template". This will be the actual body of the email that is sent. The default template will include the "submitted on" information, the "submitted by user" information, and the actual content or values the user entered. It will also include a link to view the submission online. Then we have some token values and included email values. If you would like to include some additional submission information you can use the tokens provided here. And if you would like to exclude some of the responses from this email you can deselect the boxes in the "included email values" section. I am done here so I will save email settings.
Sending a copy to the user
We can add additional emails the same way, but this time I'm going to tell it to send one to the user who just submitted the form.
- So I will choose "component value", and select the email field.
This will send an email to whatever the user entered in the "email" field. So I'll click "add", and then we have the same options as before. I'm going to leave everything as the defaults and click "save email settings".
NOTE: You do need to be careful with this, as anyone can enter anyone else's email address in that field. We'll talk about one way to prevent spam bots from doing this in Part 15 when we discuss spam protection.
Let's fill it out and see what the email looks like.