/// <summary>
        ///     Sends your message asynchronously.  This method does not block.  If you need to know
        ///     when the message has been sent, then override the OnMailSent method in MailerBase which
        ///     will not fire until the asyonchronous send operation is complete.
        /// </summary>
        public async Task <MailAttributes> DeliverAsync(IEmailResult emailResult)
        {
            var deliverTask = this.SendAsync(emailResult.MailAttributes);
            await deliverTask.ContinueWith(t => AsyncSendCompleted(emailResult.MailAttributes));

            return(emailResult.MailAttributes);
        }
 public virtual List<IMailResponse> Deliver(IEmailResult emailResult)
 {
     return this.Send(emailResult.MailAttributes);
 }
        /// <summary>
        ///     Sends your message asynchronously.  This method does not block.  If you need to know
        ///     when the message has been sent, then override the OnMailSent method in MailerBase which
        ///     will not fire until the asyonchronous send operation is complete.
        /// </summary>
        public async Task<MailAttributes> DeliverAsync(IEmailResult emailResult)
        {
            var deliverTask = this.SendAsync(emailResult.MailAttributes);
            await deliverTask.ContinueWith(t => AsyncSendCompleted(emailResult.MailAttributes));

            return emailResult.MailAttributes;
        }
 public virtual List <IMailResponse> Deliver(IEmailResult emailResult)
 {
     return(this.Send(emailResult.MailAttributes));
 }
 private void AsyncSendCompleted(IEmailResult email)
 {
     _interceptor.OnMailSent(email.MailAttributes);
 }
 private void AsyncSendCompleted(IEmailResult email)
 {
    _interceptor.OnMailSent(email.MailAttributes);
 }
 private void AsyncSendCompleted(IEmailResult email)
 {
     if (this._interceptor != null)
         this._interceptor.OnMailSent(email.MailAttributes);
 }