contactus.aspx - message template

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I can not find the message template for the contactus.aspx form in the database. Does anyone know, where I can edit it?
I am using v.1.8

Thanks
13 years ago
Helger wrote:
I can not find the message template for the contactus.aspx form in the database. Does anyone know, where I can edit it?
I am using v.1.8

Thanks


What do you mean by message template? Do you mean the actual text to edit, or the file that holds the control that prints the text? The text itself can be found in the admin section under Content Management/Topics/ContactUs... the page that holds the control should be in the modules directory... called ContactUs.ascx... I believe.
13 years ago
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
13 years ago
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.
13 years ago
It should be noted that some SMTP servers require that the email come from the site that sent it, meaning that the setting I just posted needs to be set to "true".

My SMTP server allows this setting to be set to "false", but yours may not.
13 years ago
Thanks Barry. Just changing the setting works fine on SoftSys Hosting.
Any idea how to get 'the email a friend' message to show up with the sender address in the From: field, so that recipients can just hit the reply button?
Btw., I could not find the code you gave anywhere in vers.1.8

Thanks - Helger
13 years ago
Helger wrote:
Thanks Barry. Just changing the setting works fine on SoftSys Hosting.
Any idea how to get 'the email a friend' message to show up with the sender address in the From: field, so that recipients can just hit the reply button?
Btw., I could not find the code you gave anywhere in vers.1.8

Thanks - Helger


Not sure...

maybe the code I posted in just in 1.90.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.