public void SendEmail(SmtpContext context, EmailMessage message)
        {
            Guard.ArgumentNotNull(() => context);
            Guard.ArgumentNotNull(() => message);

            using (var msg = this.BuildMailMessage(message))
            {
                using (var client = context.ToSmtpClient())
                {
                    client.Send(msg);
                }
            }
        }
        public Task SendEmailAsync(SmtpContext context, EmailMessage message)
        {
            Guard.ArgumentNotNull(() => context);
            Guard.ArgumentNotNull(() => message);

            var client = context.ToSmtpClient();
            var msg    = this.BuildMailMessage(message);

            return(client.SendMailAsync(msg).ContinueWith(t =>
            {
                client.Dispose();
                msg.Dispose();
            }));
        }