cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
New

Cannot get C# / .net application to send emails

At this point, I think it's fair to say that I have tried everything under the sun for this and I have no reason why I am unable to send emails. 

I am working on a C# application that will be hosted on my companies IIS server (not godaddy) , however, I want to use my godaddy account to send emails.

I have tried all combinations of servers and ports I could find, I even visited this link where someone said that it worked but I have not been able to mirror that success, this is my code.

 

SmtpClient smtpClient = new SmtpClient("smtpout.secureserver.net", 80);
smtpClient.UseDefaultCredentials = false;
smtpClient.Credentials = new NetworkCredential("username", "password@");
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
smtpClient.EnableSsl = false;

 

// var smtpClient = new SmtpClient("smtpout.secureserver.net")
//var smtpClient = new SmtpClient("dedrelay.secureserver.net", 25)
// var smtpClient = new SmtpClient("relay-hosting.secureserver.net", 25)
// {
// Port = 25,
// UseDefaultCredentials = false,
// EnableSsl = false,
// Credentials = new NetworkCredential("user", "pass@"),
// DeliveryMethod = SmtpDeliveryMethod.Network

//};

 

This is my error "e = {"Service not available, closing transmission channel. The server response was: Cannot connect to SMTP server 72.167.234.197 (72.167.234.197:25), connect error 10060"}"

Appreciate if someone could advise.

 

Regards 

 

1 ACCEPTED SOLUTION
Community Manager

Hi @kemnet. I have a few thoughts. 

 

First, the only way this would work would be sending through smtpout.secureserver.net IF you have a valid email address set up. relay-hosting and dedrelay can only be used from inside our hosting system. 

 

Second, you'll want to make sure you're sending through the the same region as the email address  you set up. So for example:

  • US email plan - smtpout.secureserver.net
  • EU email plan - smtpout.europe.secureserver.net
  • AP email plan - smtpout.asia.secureserver.net

Third, you'll want to make sure you're using the full email address as the user and not just the name@ part. 

 

Beyond that, I'd suggest contacting your ISP to make sure they will allow email to go through a 3rd party server as @PL281 suggested. Hope that helps. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.

View solution in original post

5 REPLIES 5
Super User IV

@kemnet 

 

As per https://answers.microsoft.com/en-us/msoffice/forum/msoffice_outlook-mso_other/error-10060-cannot-con... 

 

It maybe that your ISP is requiring you to use their SMTP servers - I've seen this before (many years ago) where all SMTP had to go through the ISP as they did this as a way to prevent someone from running an in house mail server and potentially black listing IPs / the ISP as the RDNS pointed back to them. 

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

Let's say that is the case. Would using google's free smpt server work? because If I use smtp.gmail.com with port 587 and a google account. the mail works just fine. So how would google free SMPT server work but not GoDaddy

@kemnet 

 

That is using port 587 vs 25 - I believe GoDaddy does allow for 587 and 465 for SMTP as well - so that maybe a work around

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

Tried port 587 with each option of the smpt server and each time "e = {"Service not available, closing transmission channel. The server response was: Cannot connect to SMTP server 72.167.234.197 (72.167.234.197:25), connect error 10060"}" is the error

Community Manager

Hi @kemnet. I have a few thoughts. 

 

First, the only way this would work would be sending through smtpout.secureserver.net IF you have a valid email address set up. relay-hosting and dedrelay can only be used from inside our hosting system. 

 

Second, you'll want to make sure you're sending through the the same region as the email address  you set up. So for example:

  • US email plan - smtpout.secureserver.net
  • EU email plan - smtpout.europe.secureserver.net
  • AP email plan - smtpout.asia.secureserver.net

Third, you'll want to make sure you're using the full email address as the user and not just the name@ part. 

 

Beyond that, I'd suggest contacting your ISP to make sure they will allow email to go through a 3rd party server as @PL281 suggested. Hope that helps. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.

View solution in original post