August 28, 2010

nopCommerce Mail Configuration

To enable mail Settings in nopCommerce deployed on Godaddy Server which will allow customer to fill up the contact form and send information to the Admin through email

  1. Click Configuration.
  2. Click Mail Settings.
  3. Fill up the below information
    Store Admin Email
    Your email address.
    Store Admin Email Display Name
    The name to display on your email.
    (Make sure that the “Store Admin Email” value is something other that a yahoo, hotmail, gmail address – GoDaddy does not allow these domains)
    Host
    relay-hosting.secureserver.net
    Port
    25
    User
    Your full email address.
    Password
    Your email account password.
    Enable SSL
    Do not enable this option.
    Use default credentials
    Do not enable this option.
  4. Click Save.

To enable contact us form, the hack involves getting to the source code.
The problem with Godaddy.com is that it does not allow yahoo, hotmail
or gmail addresses to the “from” email address. Most other email
addresses are allowed

To solve this, go to the file ContactUs.ascx.cs
Within this file, in the method,

btnContactUs_click(), change the line
that starts with
MessageManager.SendEmail(….); to the following:

MessageManager.SendEmail("Contact us form", "Name: " +
txtFullName.Text + "\nEmail: " + txtEmail.Text + "\nEnquiry: " +
txtEnquiry.Text, "admin@yourstore.com", to);

Basically, we have altered the “from” email address to be hard-coded
to something static. We also appended the email address and Name to
the information being sent to the “to” address.

2 comments:

  1. Do you mind if I quote a few of your articles as long as I
    provide credit and sources back to your webpage?
    My blog site is in the very same niche as yours and my users would certainly benefit from a lot of the information you
    present here. Please let me know if this ok with you.
    Thanks a lot!
    My website :: sms web gratis application.

    ReplyDelete