Take the 2-minute tour ×

Is this possible? I am able to send through localhost, but on godaddy the email doesn't get sent. Has anyone managed to achieve this?

I'm using C#

share|improve this question
add comment

9 Answers

It appears that GoDaddy blocks the SSL ports required by gmail's smtp access. This means you are out of luck at this point. You could just use GoDaddy's local relay:

relay-hosting.secureserver.net with no credentials.


share|improve this answer
thanks it helps me a lot... –  Bhavik Goyal Apr 1 '11 at 16:33
This worked for me. –  The Muffin Man Jul 6 '12 at 2:19
add comment

This seems to be a common issue.

There are two things required.

This should make it work correctly.

share|improve this answer
so it IS possible to send mail programmatically through google apps mails servers from GoDaddy)? –  Swami Aug 3 '09 at 23:51
Yes. It should work fine, provided you do everything correctly. –  Reed Copsey Aug 4 '09 at 15:56
The 'configuration specified here' link you provided is giving me ASP.NET errors... :-s –  jonathanconway Jul 11 '10 at 5:39
@jonathanconway: It was working when I posted it. Hopefully they'll get their site fixed soon ;) –  Reed Copsey Jul 12 '10 at 15:28
that link is now dead reed –  Sotkra Nov 15 '11 at 15:58
show 1 more comment

When using relay-hosting with Godaddy the email objects FROM email address MUST be a Godaddy "white Listed" email.

They do this to stop spammers hijacking an account

There is an alternative for using the relay-host

Using the GoDaddy form-mailer, (Google Serach: "_gdForm/webformmailer.asp")

This alternative can be used to send a pre-designated "form-mailer" email account all the web forms and it does work! but does require some hosting.content.form-mailer setup on GoDaddy.

check out how I've used the form-mailer:

(only catch is, it takes away the ability to code a subscribe/unsubscribe XML database, as the form data is sent off to this inaccessable ASP file) So I may end up revert back to using relay hosting in ASP.NET

www.earthed.net.au\News.aspx www.earthed.net.au\Contact.aspx www.earthed.net.au\Support.aspx

My ultimate goal was to have an email come into my inbox from joe@blogs.com with the necessry form field data, but no matter how you go your Host provider's security setting will ultimately determine your ability to do this.

Also tried using google and hotmail smtp hosts (as I have an account with each) and same secirty restriction story, maybe a lesser known free web email provider that has lower security settings allowing full relay hosting (if so let me know)

share|improve this answer
add comment

I was able to send an email through GoDaddy using these settings in the web.config:

                <network host="smtpout.secureserver.net" userName="emailaccount@yourdomain.com" password="****" />

and this code:

var SmtpClient = new SmtpClient();
SmtpClient.Send("emailaccount@yourdomain.com", "to@whatever.com", "subject", "body");

Note I believe that the from address in the email you are sending has to be from your domain. I tried sending an email as coming form another domain and got an error message.

You have to make sure you have an email account in GoDaddy, you can check by logging in and going to Products > Email > Email Plans. You also have to make sure SMTP relay is turned on, it was turned on by default for me. Also important to know by default my GoDaddy account only allows me to send 250 emails a day.

share|improve this answer
add comment

The last time I tried doing this (maybe early 2011-ish) I was not able to programmatically send out from Gmail account on GoDaddy. I took code the exact same code that worked on a different hosting company's server and it failed on GoDaddy's server so I'm quite confident that the code was not the issue.

I called their tech support and got conflicting information but I had heard enough to convince myself sending via Gmail was not a for sure supported service on GoDaddy's servers.

I was also given the workaround option of using their web email form which is totally not what the project I was working on could use and underscored the notion that GoDaddy did not fully understand what they talking about.

In the end I found that I was able to just use GoDaddy's SMTP servers and plug in my own "from" address which allowed me to send mail to any email address and to spoof the origination email address. So they end up locking down legitimate email functionality and instead force you to use a highly abusable system instead.

Again, this was a while ago that I ran into this issue but it would be easy enough to check to see if they still allow you to use their SMTP server to send emails.

share|improve this answer
add comment

I am creating a simple contact form using ASP.Net MVC 3 on GoDaddy. I wanted to be able to send the emails to accounts hosted on Google Apps. This question matched my situation, but only this GoDaddy help article really solved my problem. Hope it helps someone else!

Code sample from the article:

    // language -- C#
// import namespace
using System.Web.Mail;

private void SendEmail()
   const string SERVER = "relay-hosting.secureserver.net";
   MailMessage oMail = new System.Web.Mail.MailMessage();
   oMail.From = "emailaddress@domainname";
   oMail.To = "emailaddress@domainname";
   oMail.Subject = "Test email subject";
   oMail.BodyFormat = MailFormat.Html; // enumeration
   oMail.Priority = MailPriority.High; // enumeration
   oMail.Body = "Sent at: " + DateTime.Now;
   SmtpMail.SmtpServer = SERVER;
   oMail = null; // free up resources
share|improve this answer
add comment

IIRC, godaddy does not allow permissions to create the SmtpClient object. So, unless something has changed, you cannot send email using godaddy.

What is the exact exception you are seeing?

Thanks! Dave

share|improve this answer
add comment

Almost forgot here are googles detailed instructions. The above tool will change automatically 8-)


share|improve this answer
add comment

Your Answer

