hi,
At the bottom of the email received when eForm sends the email (the template chunk) is a link like:
<p>To reply to that email, <a href="mailto:[+email+]?subject=RE: Online Request">click here</a>.
However, there are some other variables used in that template and I’d like to get all those into the body of the email reply link (body field of mailto).
E.g. those are:
<p>Name: [+name+]</p>
<p>Address:
[+address+]</p>
<p>Email: [+email+]</p>
<p>Phone number: [+phone+]</p>
<p>Message:
[+message+]</p>
How can I get those to display properly after clicking on the email reply link with the same formating as in the eForm generated email, including line breaks when the field value is on more than one line?
I tried various options, including encoding the HTML tags, but nothing worked so far.
Thanks
Did you try:
<a href="mailto:[+email+]?subject=RE: [+subject+]?body=[+name+]">[+email+]</a>
HTH Tom
Hi Tom,
Yes, I tried that and it includes the name in the body.
If I add all those variables, they will be inserted in the email body.
But what I try to figure out is how to include the formating as well (<p> e.g.).
If only I could change the "from" of the email to be the email address inserted by the visitor in the form instead of the system email, I could simply do a Reply of the email and I wouldn’t have to rebuild the whole "body" of the email.
Julien
-
☆ A M B ☆
- 24,524 Posts
Due to the way links work in HTML, special characters must be encoded when you construct a default body for a mailto: link. A space must be translated to "%20", for example, and a line break becomes "%0D%0A".
http://email.about.com/od/mailtoemaillinks/a/mailto_elements.htm
http://email.about.com/library/misc/blmailto_encoder.htm
Thanks for your suggestions.
I decided to go an easier way I should have thought of.
I simply added a &from=`[+email+]` in my eForm snippet call and I can simply press the "reply" button in my email client now.
One issue I still have though is that the message entered by the visitor is not formated properly in the notification email sent by eForm, as the line returns are ignored.
Any ideas on that one?
-
☆ A M B ☆
- 24,524 Posts
If the mail is being sent as HTML, it will ignore line breaks. You either need to send the mail as text, not HTML, or write a filter to convert line breaks to HTML
tags. Actually you might be able to use PHx to do this in your notification template.