/// <summary>
        ///     Sends async the given email
        /// </summary>
        /// <param name="mail">The mail message to send.</param>
        public async Task<IMailAttributes> DeliverAsync(IMailAttributes mail)
        {
            if (mail == null)
                throw new ArgumentNullException("mail");

            var mailContext = new MailSendingContext(mail);
            _interceptor.OnMailSending(mailContext);

            if (mailContext.Cancel)
                return null;

            Task<IMailAttributes> sendtask = _sender.SendAsync(mail);
            await sendtask.ContinueWith(t => AsyncSendCompleted(t.Result));
            return mail;
        }
        /// <summary>
        ///     Sends the given email
        /// </summary>
        /// <param name="mail">The mail message to send.</param>
        public IMailAttributes Deliver(IMailAttributes mail)
        {
            if (mail == null)
                throw new ArgumentNullException("mail");

            var mailContext = new MailSendingContext(mail);
            _interceptor.OnMailSending(mailContext);

            if (mailContext.Cancel)
                return null;

            _sender.Send(mail);
            _interceptor.OnMailSent(mail);

            return mail;
        }