TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Marvin kakuru
1.4k
353
159.4k
failure sending email
Nov 26 2019 7:50 AM
hi everyone
i have been sending emails successfuly using my windows application, but all of the sudden my application is failing to send emails and am getting an error
"unable to read data from transport connection: net_io_connetionclosed."
below is the code i have been using
}
string smtAddress = "smtp.mail.yahoo.com";
int portNumber = 587;
bool enableSSL = true;
DateTime dat = DateTime.Parse(label55.Text.ToString());
string emailFrom = "
[email protected]
";
string password = "kyozimayenje";
string emailTo = "
[email protected]
";
string subject = dat.ToString("dd/MM/yyyy") + " - " + "Testing Bank Emailing System";
string body = "Dear Customer Banking Emailing System Undergoing Testing";
using (MailMessage mail = new MailMessage())
{
mail.From = new MailAddress(emailFrom);
mail.To.Add(emailTo);
mail.Subject = subject;
mail.Body = body;
mail.IsBodyHtml = true;
//Attachments
//mail.Attachments.Add(new Attachment("C:\\Import of Used clothing & stationary research.pdf"));
SmtpClient smtp = new SmtpClient(smtAddress, portNumber);
{
smtp.Credentials = new NetworkCredential(emailFrom, password);
smtp.EnableSsl = enableSSL;
smtp.Send(mail);
}
}
any help will be greatly appreciated
Reply
Answers (
0
)
TCP IP Connection
Login to Azure portal using c#