send message
how to send message from 1 pc to another pc via network in c#.(in desktop application)......plz its urgent
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
vikas kananiPosted Sep 7, 2012, 1:44 PM
Rewant ChoudharyPosted Sep 7, 2012, 10:11 AM
MailMessage mail = new MailMessage();
mail.Bcc.Add("[email protected]");
mail.From = new MailAddress("[email protected]", "WebAccouting");
mail.Subject = "Feedback...!!!";
mail.Body = "body";
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com"; //Or Your SMTP Server Address
smtp.Credentials = new System.Net.NetworkCredential("GmailID", "password");
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.Send(mail);