Version 3.6 - Contact Us Template

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
Hello,

We are using version 3.6.  Is there a Contact Us email template somewhere in the system?  Right now when our customer's fill out the Contact Us form, they enter their email address, but the email our sales team receives does not include the customer's email address.  

Is there any way to have the Contact Us email notification include the actual email address of the customer?


Thanks!  Mike
8 years ago
Doesn't look like it.  By default the email is sent with the from address set to the customers email so you can just hit reply and it'll be replying to the customers email address, but it uses the customers full name as the display name so in email clients like Outlook you'll only see the customers name (you can right click it and check the contact card to find the actual email address).

There's a setting in General and Miscellaneous Settings > Store Information called Contact us page. Use system email. If that is checked then the email is sent from the websites default mail account and the customers name and email address is appended to the start of the message body.  That achieves what you want but you lose the convenience of being able to hit the reply button to reply direct to the customer.

If you're happy to edit the source code it's easy to get the best of both. Find this block of code in CommonController.cs and move the "body =" bit outside of the if else block as shown below:
//required for some SMTP servers
if (_commonSettings.UseSystemEmailForContactUsForm)
{
    from = emailAccount.Email;
    fromName = emailAccount.DisplayName;
}
else
{
    from = email;
    fromName = fullName;
}

/*Include email in body even when using customers email in from field*/
body = string.Format("<strong>From</strong>: {0} - {1}<br /><br />{2}",
    Server.HtmlEncode(fullName),
    Server.HtmlEncode(email), body);
/*-----------------------------------------*/
8 years ago
Thanks Pete - for the detailed explanation and including the code to make the change!!!
5 years ago
Hi, Where is the template for the form on Contact Page for 4.10? on the previous versions, when some fill the form, the store owner will receive email containing the customer's name and email address. how could I achieve this on V4.10?
Thanks,
5 years ago
Oh, found it--Message templates
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.