Hardik Gondalia
Hardik Gondalia

Reputation: 3717

SendAsync always showing Status Waiting using MVCmailer

I am developing application in MVC5 and MVCMailer. I am sending email using SendAsync command which always show Status = "WaitingforResponse" and mail is not sent. If I use "Send" command instead, it works fine. Here is my code:

var v = new UserMailer().SendCampaignMail("email_address").SendAsync();

and UserMailer.cs

 public virtual MvcMailMessage SendCampaignMail(string Email)
    {
        try
        {
            return Populate(x =>
            {
                x.Subject = "Campaing";
                x.ViewName = "PasswordReset";
                x.To.Add(Email);
            });
        }
        catch(Exception ex)
        {
            throw ex;
        }
    }

Screenshot for response: http://prntscr.com/82yfwq Thanks for your Help:

Upvotes: 0

Views: 48

Answers (0)

Related Questions