
Sending an e-mail to the site administrator is great, until he decides to reply. Then we have a problem. When you click Reply, the e-mail that opens is addressed to the site administrator (actually, we set it to info@example.com
if you recall). So, he sends the e-mail to himself, and not to the person who submitted the form.
Yet their e-mail is right there in the e-mail text. Can't we put that in the From Email field? Then the reply will go just where we want it.
Well, yes we could put the e-mail in there (technically using a Dynamic From Email field). But then we find that the administrator no longer receives any e-mails at all!
This is most likely because the site ISP is checking for spammers and one of the checks that they run is to compare the site domain with the domain in the From Email header of the e-mail. If they don't match, the e-mail is marked as "likely spam" and dropped in the bin.
The answer is to use the Reply To Name and Reply To Email headers.
We're going to use the form from the end of Chapter 1, Creating a Simple Form which has Name and Email fields.
In Chapter 1, Creating a Simple Form, we used Wizard Edit to change our form; here we're going to start exploring the complexity of the Form Editor. Fortunately, in this case it is pretty much the same.
- In the Forms Manager click the Form Name to open the Form Editor.
When the Form Editor opens, notice that there is a row of tabs starting with General, next to which is Setup Emails. This is the one that we want, so click the tab to open it.
As expected, what is on this tab is pretty much identical to the Email Setup view from the Wizard Edit and what's more, there is all the data we entered in the Wizard Edit.
- There, we already have the four elements that are required to enable an Email Setup. We are now going to add two more "Reply To" elements for the information that the user has submitted in the form.
We need their name and their e-mail address and we already have these fields in our form; so far so good. But we can't just type the values in because they are going to be different each time the form is submitted.
We call these changing values dynamic as opposed to the static unchanging values we have so far.
And you'll notice that in the Toolbox there are two versions of each element — To and Dynamic To, Subject and Dynamic Subject, and so on.
To capture values input from the form, we use the dynamic versions. And instead of static values we put field names into the boxes. Then when the form is submitted, ChronoForms will put in the values from the submitted form.
First drag the Dynamic ReplyTo Name and the Dynamic ReplyTo Email elements into the workspace.
- Now we just need to add in the field names for those two fields in the two boxes. They were
text_0
for the Subscriber Email input andtext_1
for the Subscriber Name input. - That's all we need for now, so let's save the Form using the Save icon in the Form Editor toolbar and return to the Forms Manager.
- Click the Form link again to open the form; put some information into the boxes and submit the form.
When the e-mail arrives click the Reply To button and you should find that the To... address for the e-mail is set to the address of the new subscriber.
- Chapter 1, Creating a Simple Form. The Send your form results by e-mail section describes how to use the Form Wizard to set up e-mails, and the Format your e-mail section talks about formatting the content of the e-mail.