Send Email from GoDaddy Asp.Net Application

In my previous article we looked at how to use Google account and SMTP server to programatically send mail to an email address. We can use the same code with minor changes for GoDaddy application which is using shared hosting. We will develop a “Contact us” page here using SMTP server from GoDaddy.

The first step is to create a web service

The app settings are as following

The HTML page code for the contact us page is as following

Now add the java script code as following in our HTML

The complete code can be downloaded from here.

Be aware that if you are setting email address entered by the user in the “from” address while sending the email, it may end up in SPAM folder of your mailbox. Alternatively you can use “from” and “to”addresses from your application domain itself and append user’s email address in the mail body.


Leave A Comment

Your email address will not be published. Required fields are marked *