Click here to Skip to main content
15,902,114 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was recently switched to Comcast as my internet provider. Since being switched, I can't send emails using System.Net.Mail. The code I'm using is:

Dim mSmtpClient As New SmtpClient()
mSmtpClient.Host = CsServer
mSmtpClient.Port = CsPort
mSmtpClient.EnableSsl = CsUseSSL
mSmtpClient.UseDefaultCredentials = False
mSmtpClient.Credentials = New NetworkCredential(CsSmtpUserName, CsSmtpPassword)
mSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network
mSmtpClient.Send(objMsg)
objMsg.Dispose()


CsServer = smtp.comcast.net
CsPort = 587
CsUseSSL = True
CsSmtpUserName = My email address including the @Comcast.net
CsSmtpPassword = My password

I have tried CsSmtpUserName with and without the @Comcast.net
I have tried UseDefaultCredentials with True and False

My environment is VS 2010, .Net 4, Windows 10. I'm using LocalHost in the development environment

What I have tried:

I have tried different combinations of settings and reviewed a number of possible solutions, none of which worked.
Posted
Updated 20-Dec-17 1:35am
Comments
ZurdoDev 19-Dec-17 14:10pm    
You had code that worked, changed your internet service provider, now the same code does not work. What do you want us to do? What error do you get?

1 solution

Contact your provider (Comcast) and ask him for the SMTP settings. A quick web research shows that port 465 might be used instead of 587.

You can check the settings also with any mail client program like Outlook or Thunderbird. Once that works, use the same settings in your code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900