Rank: Newbie
Medals: Groups: Registered
Joined: 3/22/2010 Posts: 8 Points: 27 Location: Tbilisi
Thanks: 0 times Was thanked: 0 time(s) in 0 post(s)
|
BB კოდი: public static void SendMail(string smtpserver, string from, List<string> to, string cc, string bcc, string subject, string body, ICollection<System.Net.Mail.Attachment> attachments, bool IsBodyHtml, System.Net.Mail.MailPriority Priority) { System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
msg.From = new System.Net.Mail.MailAddress(from);
foreach (string item in to) { msg.To.Add(item); }
if (bcc.Length > 0) msg.Bcc.Add(bcc);
if (cc.Length > 0) msg.CC.Add(cc);
msg.Subject = subject; msg.Body = body;
msg.IsBodyHtml = IsBodyHtml; msg.Priority = Priority;
if (attachments != null) { foreach (System.Net.Mail.Attachment att in attachments) { msg.Attachments.Add(att); } }
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(); smtp.Host = smtpserver; smtp.Send(msg);
}
keep an eye open
|
|
Apex ltd. http://www.apex.ge
|