.NET and Open Source: better together


  • Join Us on Facebook!
  • Follow Us on Twitter!
  • LinkedIn
  • Subcribe to Our RSS Feed

SMTP with GoDaddy

That is amazing how easy it is to fix any problem as soon as it gets to the status of the ex-problem. After I found the way to make my email work on GoDaddy with their Form Mailer, I took another look at SMTP and sure enough all peaces readily fall into place. Here is step-by-step instruction on how to setup and use SMTP with GoDaddy – the way God intended.


1. Get GoDaddy’s email account. I believe it comes with any domain registration or hosting package for free. Do not use external POP account (Google, Yahoo, Hotmail etc.). They all require SSL and custom port and you’ll get nothing but trouble. So sign up for internal GoDaddy mail account, your SMTP server will be smtp.secureserver.net (or whatever they assign you). The reason SMTP did not work for me is exactly that – it was blocked by firewall on my hosting server. So, let’s say you have domain “smith.com” with GoDaddy. When you create email account you will set user name and password, let’s say it is “john” and “password”. And your server is “smtp.secureserver.net”. This is how you create your client then:

2. In your code, create message - the usual way:

using System.Net.Mail;

MailMessage message = new MailMessage();
message.From = newMailAddress("me@us.com");
message.To.Add(new MailAddress("you@them.com"));
message.Subject = "test";
message.Body = "This is test";

3. Set up client and send message:

SmtpClient smtp = new SmtpClient("smtp.secureserver.net");
smtp.Credentials = new System.Net.NetworkCredential("john","password");
smtp.Port = 25;
smtp.EnableSsl = false;

Pretty easy - ones you understand why your message is not getting to smtp.gmail.com with SSL on through the port 465 (583, 995…). Because they all closed!

Comments (14) -

  • Stephan

    10/12/2007 6:31:25 AM |

    I use different host and it does not provide me email account - not for free at least as far as I know. Do you know any smtp providers that let you go through standard port 25? I seriously doubted my host will drill hole in the firewall for gmail, even if I ask nicely :(

  • rtur.net

    10/12/2007 8:13:13 AM |

    It all depends on host you are using, as far as I know some wont let you use port 25 either – but they will give you mail account you can use instead. I suggest you ask your host before looking for alternatives.

  • Carlos Andres Cortes

    1/14/2008 4:56:33 PM |

    I have found inside godaddy a most usefull and reliable method to send mail, it uses CDOSYS and works perfectly, the address is


    this is the code that I have tried, using VB.

    Sub Sendmail()
            Dim message As New MailMessage
            message.From = "acortes@***.com"
            message.To = "acortes@***.com"
            message.Subject = "Contact us"
            message.BodyFormat = MailFormat.Html
            message.Priority = MailPriority.High
            message.Body = "This is a Test!!!"
            SmtpMail.SmtpServer = "relay-hosting.secureserver.net"
    End Sub

    And it worked flawlessly.

    Thank You.

  • Carlos Andres Cortes

    1/14/2008 4:59:15 PM |

    Almost forgot, you must use the namespace System.Web.Mail instead of System.Net.Mail which is most updated but doesn't work or at leats doesn't work for me.

    on VB

    Imports System.Web.Mail

  • rtur.net

    3/17/2008 3:04:05 PM |

    For BE users, this is what my mail settings look like:

  • Nat

    4/28/2008 12:10:13 PM |

    Hi I have a godaddy hosting with IIS 6 and asp.Net 2.0/3.0/3.5 and i can t get the system.net.mail code to work,  the code works perfectly locally, I get mail instantly. But once its up on the server it crashes. code as follows:

    private void SendMail(string from, string body)
            MailMessage message = new MailMessage(from, "info@mypage.com", "Web Mail", body);
            SmtpClient mailClient = new SmtpClient();
            //Set SMTP Server and Credentials
            mailClient.Host = "smtpout.secureserver.net";
            mailClient.Credentials = new System.Net.NetworkCredential("info@mypagecom", "password");
            //set Port and SSL
            mailClient.Port = 25;
            mailClient.EnableSsl = false;
            //Send message

    Any help would be appreciated.

  • Mahesh Nair

    5/21/2008 10:55:59 AM |

    If you would like to use your GMail account (either regular or through Google Apps), in GoDaddy to send bulk emails and you are using a php email class like PHP Mailer or Zend Mail, then you can use the SMTP relay server that comes with your shared hosting with GoDaddy. http://help.godaddy.com/article/951.

    The SMTP relay server you need to use is relay-hosting.securesever.net and its on port 25 (Some people get confused that they need to use 465, but thats only when you use Google's smtp.gmail.com servers). Also no USERNAME or PASSWORD is required.

    It works amazingly well. As far as I know, there is only a 1000 emails/day limit. No limit on the number of emails/hour.



    9/2/2008 8:31:12 PM |


  • Anant Anand Gupta

    12/11/2008 3:17:27 AM |

    settings for blogengine on godaddy.com can be found here

  • Free Guitar Ebooks

    12/21/2008 11:27:39 PM |

    Can somebody help me to set up this one uso that i can send Mass news letters to my subscribers on my guitar ebooks site..

  • Speed Dating NYC

    12/22/2008 8:39:57 PM |

    Very informative; this will help with my form. The asp.net form tutorial skips the part about the underlying code that makes it work. This will come in handy when I am testing.

  • mike

    1/7/2009 1:18:36 PM |

    I'm having a problem sending mail through my very simple php script...here's my code

    // ------------- CONFIGURABLE SECTION ------------------------
    $mailto = 'myself@hotmail.com' ;
    $head = "Inquiry";
    $subject = "Question/Appointment"; //Subject of the e-mail
    // -------------------- END OF CONFIGURABLE SECTION ---------------

    $msg = "





    mail($mailto, $head, $subject, $msg);


    any thoughts?...does my SMPT connection look correct?



Pingbacks and trackbacks (3)+

Comments are closed