Send message
how to send message from 1 pc to another pc via network in c#.(in desktop application)......plz its urgent
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rewant ChoudharyRank #4,270 · 354 reputationPosted Sep 7, 2012, 6:11 AM EDT
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);
vikas kanani147 reputationPosted Sep 7, 2012, 9:44 AM EDT