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
Muhammad Nadeem
NA
548
66.2k
Mail Message in Window form application
Feb 17 2016 2:53 AM
Dear Sir,
I have a code for mail message in window form application but I get exception error after running. Code is here
private void buttonSend_Click(object sender, EventArgs e)
{
try
{
MailMessage mail = new MailMessage(textBoxFrom.Text, textBoxTo.Text, textBoxSubject.Text, richTextBoxMsgBody.Text);
SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
smtp.Credentials = new System.Net.NetworkCredential(textBoxOwnE.Text, textBoxPass.Text);
smtp.EnableSsl = true;
smtp.Send(mail);
MessageBox.Show("Your e-mail is sent suuccessfully!", "Message Sent", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Please help me . I shell be very thankful to you for this kindness.
Reply
Answers (
2
)
How to add bullets in table colmns field?
textbox size shrinks