Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Task SendFromServer(MailMessage mailMessage, bool reuse, bool useServerSmtp)
- {
- return Task.Factory.StartNew(() =>
- {
- var smtp = new SmtpClient();
- smtp.Send(mailMessage);
- }
- catch (Exception ex)
- {
- Logger.Error(ex.InnerException ?? ex);
- }
- finally
- {
- if(!reuse)
- mailMessage.Dispose();
- }
- });
- }
- }
Add Comment
Please, Sign In to add comment