Click here to Skip to main content
15,881,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing desktop software and having problem with the code.
Can anyone know the code for send mail and sms to user using Winform Desktop Application?
Please Help me if anyone have?
Posted
Updated 16-Jan-15 21:18pm
v2

 
Share this answer
 
Comments
Ghanshyam Vadher 2-Mar-15 5:34am    
Thanks OriginalGriff
OriginalGriff 2-Mar-15 5:39am    
You're welcome!
using System.Net.Mail;

MailMessage message = new MailMessage();
var smtpClient = new SmtpClient();
message.Subject = "test mail";
message.IsBodyHtml = true;
message.Body = "This is test mail";
message.To.Add("test@gmail.com");
smtpClient.Send(message)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900