Dot Net project at home using SMTPClient not working
I'm at home using COX for Internet access. I've had no problem configuring GoDaddy hosted server to send emails from web site and web app. At home, designed a Windows desktop project and using SMTPClient dot net api to send test email to myself using smtpout.secureserver.net, port 465, enableSSL set to true, and calling SendAsync() method. I do not get any exceptions in the call or via the callback events. But, I log into GoDaddy workspace email and I do not see test email message that I sent to myself. I used workspace web to send email to myself and it works. I called tech support who reached out to advanced support about the problem and they verified that they are not blocking anything. Tried different variations in my code and nothing seems to work. Here is a snippet of the code.
message = new MailMessage(); message.To.Add(emailAddressTo); message.From = new MailAddress(emailAddressFrom,yourName); message.Sender = new MailAddress(emailAddressFrom, yourName); message.Subject = subject; message.Body = psMessage; message.Headers.Add("User-Agent", "My Custom App"); message.IsBodyHtml = true;
Re: Dot Net project at home using SMTPClient not working
So, I tried my code against smtp.gmail.com, port 587, every other field the same, and I got a successful send to my work email address not on Godaddy. I turned off my firewall and tried again to smtpout.secureserver.net and I got, System.Net.Mail.SmtpException: Syntax error, command unrecognized. The server response was: at System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(...blah blah). And I tried both 587 and port 465. So, why does my code work at Gmail and no longer at Godaddy? What's changed?