Contact page

Topics: ASP.NET 2.0, Controls
Aug 29, 2010 at 10:14 PM

I am new to so I don't know if this has been asked before so bear with me.

There is a Contact page for When one clicks the send button, what email does it send to? And where can this be configured?

I found in Settings an email setting, but do not know how to configure it correctly to send to my gmail account. Nor do I know if this controls the Contact page.

Any help to a new user would be appreciated.


Aug 30, 2010 at 12:58 AM
Edited Aug 30, 2010 at 1:01 AM

Normally you would configure in the settings menu for your domain name, something like this:
your username
your password


You could then forward this to your gmail account from your control panel of your hosting company.

You could setup several email accounts in your hosters control panel and use the settings here to have the contact form sent to.

You could have or or whatever email account name you wish.

Aug 30, 2010 at 1:17 AM

I think you should be able to send it directly via your gmail account. Here are the settings:

The following are the Gmail SMTP server and port settings for sending mail through Gmail from any email client program:

  • under Outgoing mail, set Gmail SMTP server address:
  • Configure Gmail SMTP user name as: your full Gmail address (including Google Apps users may have to enter
  • Configure Gmail SMTP password as: Your Gmail password
  • Configure Gmail SMTP port as: 465 or 587
  • Configure Gmail SMTP TLS/SSL required as: yes



Aug 30, 2010 at 6:19 AM

I gave it a try with the gmail settings but get the following error when I clicked 'Test mail settings':

Could not connect - Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Just some general information, I am hosting on GoDaddy using BE 1.6.1. I entered my gmail address in the e-mail and username, password and I get this error for both ports 465 and 587. So I am either doing something wrong. Or there is a bug in BE.

Is there something else I can try?

Thanks for all the help.

Aug 30, 2010 at 7:22 AM

Change the port to 25 and keep Enable SSL checked.

Ports 465 and 587 are correct also, but under a typical medium trust environment (such as GoDaddy), setting the port to something other than 25 is not allowed.

Aug 31, 2010 at 12:46 AM

I just tried port 25. Still a no go. I get the follow now: Could not connect - Failure sending mail.

Any new ideas to try? Thanks.

Aug 31, 2010 at 6:48 AM

I'm almost certain there are more error details that are not being displayed (and they are the more important error details).  In the Settings.aspx.cs page in the Admin\Pages folder, you'll find the code that displays this error message you are seeing.  It's inside of "btnTestSmtp_Click".  In there is a "catch" block of code.  Modify it so it looks like this:

catch (Exception ex)
	string msg = string.Empty;
	while (ex != null)
		msg += ex.Message + ".  ";
		ex = ex.InnerException;
	lbSmtpStatus.Text = "Could not connect - " + msg;
	lbSmtpStatus.Style.Add(HtmlTextWriterStyle.Color, "red");
Then try sending out the email again.

Sep 19, 2010 at 3:28 AM

Ben, forgive me for jumping into someone else's thread but I've had the same issue.  I made the change that you suggested and I still only get the Could not connect - Failure sending mail. that billyhum received. 

Sep 19, 2010 at 6:10 AM

For what it worth, It's been a while and might changed since... When I was on GoDaddy I had to use their email account to make SMTP work. (I then set redirect to forward all to gmail). Some details here.

Sep 20, 2010 at 5:13 AM

I apologize to all, that I did not post this sooner. I did not receive any new response to my previous comment about it still not working at my email that I forgot all about it. I did find a solution a couple of weeks ago. And what rtur says is correct. GoDaddy does not allow for someone to use another SMTP through their hosting environment. What you need to do is setup an email account on GoDaddy. Then you use their smtp server to do the email using the email account you set up. You can find out more about this by doing a search for 'smtp server' through GoDaddy's support community.