Helger wrote:As it is the generated email from the 'contact us' page shows in the first line the 'from' address of the customer. I want to turn that into a clickable mailto hyperlink.
Thanks - Helger
Helger, why didn't you just ask that in the first place? :)
As it is, how the email address is displayed when you view the email sent from nopCommerce all depends on the email program that you use to open it with. I receive emails in my gmail account from my site and they ARE clickable links. But if you wanted to try to ensure that they show up as clickable links, you can do something like this:
In Header.ascx.cs, replace the line of code that creates the email address (in bold) like this
if (this.SettingManager.GetSettingValueBoolean("Email.UseSystemEmailForContactUsForm"))
{
from = new MailAddress(emailAccount.Email, emailAccount.DisplayName);
body = string.Format("<b>From</b>: {0} - {1}<br /><br /><a href=\"mailto:{2}\">{2}</a>", Server.HtmlEncode(fullName), Server.HtmlEncode(email), body);
}
This SHOULD cause the link to show up in email programs that read the emails in HTML, if your email program only reads emails in plain text, then there is NO way to get the email to show up as a link.
If you want to just have the option to be able to hit "reply" on the email that you receive from your site, you can change the setting
"Email.UseSystemEmailForContactUsForm" from true to false and that will send the email like it was coming from the customer and not your site. The sender will show up as the customer in the email and then you will be able to hit reply and send an email back to THEIR email address.
The first option may not work, I have not tested it. Worth a shot... though it will require a re-compile. The second option is a built in setting, much easier to just change that.