Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1

I have a form on my website that asks for an email address as one of the fields. What I would like is to then use this email address as a reply_to so that I can just hit reply on the email I get and it will automatically put their address in the to field of the email.

I have used the following:

Code: Select all
<cms:send_mail from=k_email_from to=k_email_to subject="new enquiry" reply_to="<cms:show email_address />">

but this just outputs Reply_to <cms:show email_address /> ?

Am I doing something wrong?

Many thanks for any help!

Hi Alex,

I am assuming you are using the <cms:send_mail> tag in the k_success block of the form (i.e. after the submitted form has been validated).
I suggest you please try placing a <cms:dump_all /> tag just before the <cms:send_mail> as shown below -
Code: Select all
    <cms:dump_all />

<cms:send_mail ...

Try submitting the form now and you should see a list of all the variables that are available for use at the point you placed that code. The submitted 'email_address' should also be in the list.

However, you'll notice that the variable containing the email address would be named 'frm_email_address' because Couch adds the 'frm_' prefix to the names of all inputs in the form.

Once you are sure that the submitted email address is available, you may use it either as
Code: Select all
reply_to="<cms:show frm_email_address />"

or simply as
Code: Select all

Needless to say, the <cms:abort> we placed above should now be removed.

Hope this helps.
Many thanks for this - I will test it out and come back if there are any issues! I appreciate the help!

One other thing that is strange - I dont know if it just with the hosting I am using but when the email comes over I see the email sender as : " MIME-Version: 1.0 Content-Type: text/plain". I have set up afew sites before on different hostings and never seen this before?
3 posts Page 1 of 1