Using CDOSYS to Send Email with GoDaddy

CDOSYS is part of the System.Web.Mail namespace and is installed by default on Windows 2000 and Windows XP platforms. It replaces CDONTS for sending SMTP email messages and can be used with GoDaddy IIS 6 and IIS 7 Windows hosting accounts. The following code sample demonstrates how to create, format, and send email with GoDaddy.

The server “” is used to send email from your GoDaddy hosted domain. You must populate the SmtpMail object’s SmtpServer property with this value. GoDaddy’s hosting servers allow for email attachments up to 30 MB.

// language -- C#

// import namespace

using System.Web.Mail;

private void SendEmail()


const string SERVER = "";

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


GoDaddy SQL Server Database Setup – Connection String

Before you upload your ASP.NET 3.5 application onto your GoDaddy hosting server, you need to modify the connection strings section of your web.config file.


<add name=”Personal” connectionString=”; Database=DB_675; User ID=user_id; Password=password; Trusted_Connection=False” providerName=”System.Data.SqlClient” /> <remove name=”LocalSqlServer”/> <add name=”LocalSqlServer” connectionString=”; Database=DB_675; User ID=user_id; Password=password; Trusted_Connection=False” providerName=”System.Data.SqlClient” />


NOTE: You may want to back up the web.config file on your local computer or simply comment out your current connection strings before you make any changes. This way, you can easily return to developing your application on you local computer.

This is an example of the connection strings section that will connect an ASP.NET 3.5 application to one of the GoDaddy SQL Servers:
NOTE: You can find your server name, database name, user ID, and password in the SQL Server section of your GoDaddy Hosting Control Center. These connection string values map to host name, database name, user name, and password, respectively. The user name and password values are those specified during SQL database (not hosting account) creation.

Recommended Web Hosts for Starter Kits

I am only going to speak from personal experience here but the two best hosts for that I have used are and  I currently have all of my sites over at because they were a better value for me.  As an additional bonus will instantly set you up with a free trial account so you can make sure they work for you before you commit to a hosting plan. While quite inexpensive, I had nothing but problems with and and the price discount was not worth the headache.  That being said if anyone has had good success with either one of those hosts or any other host for that matter please chime in with your thoughts.�