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
Ankit Kumar
NA
61
5.6k
mail not firing from windows application tool
Sep 5 2017 9:49 AM
Email not firing from windows application tool from a particular network but from other networks its working file i placed my code below.
private void button1_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
try
{
MailMessage m = new MailMessage();
sb = new StringBuilder();
m.From = new MailAddress("
[email protected]
");
m.To.Add(new MailAddress("
[email protected]
"));
string SUBJECT = string.Empty;
SUBJECT = "TestMail";
sb.Append("Hi Its a test mail <b/><br/><br/>");
m.Subject = SUBJECT;
m.Body = sb.ToString();
m.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "mail.verbinden.in";
smtp.Port = 587;
smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true;
smtp.Timeout = 80000;
smtp.Credentials = new System.Net.NetworkCredential("
[email protected]
", "Noreply123$");
smtp.Send(m);
MessageBox.Show("Email has been send");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
Reply
Answers (
1
)
Output Parameter is not returning value
Combox that contains letters textboxs stop working