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
soran mohamad
NA
12
5k
sending email get error c#
Jun 2 2015 6:30 AM
hello everyone
this is my window application code to send email
this my code
sending email failed help plz
am using c#2010
try
{
SmtpClient client=new SmtpClient("smptp.gmail.com",465);
MailMessage message = new MailMessage();
message.From = new MailAddress(txtemail.Text);
message.To.Add(txtreciever.Text);
message.Body = txtbody.Text;
message.Subject = txtsubject.Text;
client.UseDefaultCredentials = false;
client.EnableSsl = true;
if (txtattachment.Text != "")
{
message.Attachments.Add(new Attachment(txtattachment.Text));
}
client.Credentials = new System.Net.NetworkCredential(txtemail.Text, txtpassword.Text);
client.Send(message);
message = null;
MessageBox.Show("Message Sent");
}
catch(Exception ex)
{
MessageBox.Show( "Failed to Send Message");
}
Reply
Answers (
4
)
how add mysql in vidual studio server explorer list ??
Excel bulkcopy insert