Last post Jun 29, 2012 09:52 AM by robwscott
Jun 29, 2012 09:37 AM|fialbz|LINK
I have setup my website in order to be able to send email but it was fail. My website is hosted in GoDaddy.com in shared server. I have asked the problem to support center but has not been solved yet until now.
Is there any of you has website in GoDaddy.com and able to send email?
If yes, can you send the web configuration file (web.config) and VB or C# code?
Jun 29, 2012 09:44 AM|Manivelan|LINK
I have my website hosted in godaddy under the shared hosting plan.
In my webpage I have an enquiries page where customers can post their enquiries which is sent as an email to my inbox.
I am at work so bear with me I will send you the web.config settings and c# code tonight.
Jun 29, 2012 09:52 AM|robwscott|LINK
MailMessage msg = new MailMessage();
msg.From = new MailAddress(from); // from is "string"
msg.To.Add(new MailAddress(toRecipient)); // toRecipient is "string"
msg.Subject = subject; // subject is "string"
msg.Body = body.ToString(); // body is "StringBuilder"
msg.IsBodyHtml = true; <--- you most likely need this if using "html".
msg.Priority = MailPriority.Normal;
SmtpClient client = new SmtpClient();
client.EnableSsl = false; <-- most definetly need this, as you cannot use SSL w/ port 25
// web.config - this is when it's hosted ON godaddy
<network host="relay-hosting.secureserver.net" port="25"/>