by Chris Cummings | Jun 9, 2015 | Forms, GoDaddy, Wordpress
I’ve had a couple of sites that had problems getting emails from a CF7 form when sent to godaddy.
What has worked for me is this page, very last entry: https://wordpress.org/support/topic/contact-form-7-wp-mail-smtp-godaddy-e-mail-not-working-1
by Chris Cummings | May 31, 2012 | C#, GoDaddy
Hi! How are you? I’m fine, thanks for asking! 🙂
I haven’t posted any C# stuff in a while but I’m working on something that bears mentioning. If you are sending C# emails via a contact form you’ll want to see this site:
http://support.godaddy.com/help/article/1073/using-cdosys-to-send-email-from-your-windows-hosting-account
And use this code:
// language -- C#
// import namespace
using System.Web.Mail;
private void SendEmail()
{
const string SERVER = "relay-hosting.secureserver.net";
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;
SmtpMail.Send(oMail);
oMail = null; // free up resources
}