Click here to Skip to main content
15,908,634 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am getting the error as smtp exception

Unable to read data from the transport connection: net_io_connectionclosed.

What I have tried:

C#
client.Host = "smtp.bizmail.yahoo.com";
client.Port = 465;
client.EnableSsl = true;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = true;
client.Credentials = new System.Net.NetworkCredential("xxx@yahoo.com", "xxxxxxx");
Posted
Updated 28-Jun-17 21:34pm
v2
Comments
Ali Majed HA 29-Jun-17 3:04am    
Try port 587 instead of 465.
Zubair SE 29-Jun-17 3:14am    
Please confirm, if u r enable to send mail to a single user.
F-ES Sitecore 29-Jun-17 4:56am    
Try client.UseDefaultCredentials = false;

Ultimately you shouldn't be sending email through yahoo, your ISP or webhost will provide an SMTP server for you to use.

I suspect your Port is incorrect. Try changing it to 587 instead.
 
Share this answer
 
Comments
Member 13284193 29-Jun-17 5:28am    
i am using yahooo , 587 is the port for gmail
Pete O'Hanlon 29-Jun-17 6:00am    
https://help.yahoo.com/kb/SLN4724.html
Are you able to send mail to a single user, using shared configurations?
 
Share this answer
 
Comments
Member 13284193 29-Jun-17 5:27am    
nope
Zubair SE 29-Jun-17 6:46am    
please edit the values and try if email is send to a single user id
client.EnableSsl = false;
client.UseDefaultCredentials = false;

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