Send Email Programmatically On GoDaddy
I have had a difficult time getting dasBlog to send emails on my GoDaddy account. I have not been able to figure out the configuration required to get it to work. I also wanted to have a “contact” page that is served up outside of dasBlog. This would make it accessible to other web pages independent of dasBlog. It turns out that the code to send emails from your GoDaddy account is simple. The following code works on my account:
MailMessage msg = new MailMessage(); msg.From = new MailAddress("no-reply@bobcravens.com", "Website Contact Form"); msg.To.Add("bob.cravens@gmail.com"); msg.Subject = "Test Email" msg.Body = "This is only a test." msg.IsBodyHtml = false; SmtpClient smtp = new SmtpClient("relay-hosting.secureserver.net", 25); smtp.Send(msg);
Note: For security reasons, GoDaddy will not allow you to set a ‘From’ address outside of you domain.
Comments
Where is the credentials, email and password…