public bool Send(SendMailRequest request) { if (request != null) { MailMessage mail = new MailMessage(); mail.SetRecipients(request.MailTo, request.MailCC, request.MailBCC); mail.From = From; mail.Sender = Sender; mail.Subject = request.Subject; mail.SubjectEncoding = Encoding.UTF8; mail.IsBodyHtml = request.IsBodyHtml; mail.BodyEncoding = Encoding.Unicode; mail.Body = request.Body; mail.AddAttachments(request.Attachments, ResourceResolver); mail.AddHtmlView(request.Body, request.HtmlResources, ResourceResolver); return(Send(mail)); } throw new Exception("Request is null"); }
public bool Send(SendMailRequest request) { if (request != null) { MailMessage mail = new MailMessage(); mail.SetRecipients(request.MailTo, request.MailCC, request.MailBCC); mail.From = From; mail.Sender = Sender; mail.Subject = request.Subject; mail.SubjectEncoding = Encoding.UTF8; mail.IsBodyHtml = request.IsBodyHtml; mail.BodyEncoding = Encoding.Unicode; mail.Body = request.Body; mail.AddAttachments(request.Attachments, ResourceResolver); mail.AddHtmlView(request.Body, request.HtmlResources, ResourceResolver); return Send(mail); } throw new Exception("Request is null"); }