Thursday, July 16, 2009

send mail window C#

MailMessage MailMesaji = new MailMessage();MailMesaji.Subject = "subject";MailMesaji.Body = "mail body";MailMesaji.BodyEncoding = Encoding.GetEncoding("Windows-1254"); //EncodingMailMesaji.From = new MailAddress("shimi.gov@gmail.com");MailMesaji.To.Add(new MailAddress("shimi.gov@gmail.com"));System.Net.Mail.SmtpClient Smtp = new SmtpClient();Smtp.Host = "smtp.gmail.com"; // for example gmail smtp

No comments:

Post a Comment