title: Hangfire background job remain enqueued
body: <p>I have a MVC application and I am trying to send an email using Hangfire and Postal. The email must be sent after a registration. 
  The registration works properly, but the job I run remain enqueued and I not receive any email.
  So in my MVC controller I have the following code:</p>
  
  <pre><code>public async Task&lt;ActionResult&gt; Register(RegisterViewModel model)
  {
      //register correctly the user
  
      //I send the email
      BackgroundJob.Enqueue(() =&gt; 
          NotifyRegistration(user.Id, user.UserName, user.Email)   
      );
  
      ...
   }
  
  [AutomaticRetry(Attempts = 5)]
  public async Task NotifyRegistration(string userId, string username, string email)
  {
      //I calculate callbackUrl
  
      var viewsPath = Path.GetFullPath(HostingEnvironment.MapPath(@"~/Views/Emails"));
      var engines = new ViewEngineCollection();
      engines.Add(new FileSystemRazorViewEngine(viewsPath));
  
      var emailService = new EmailService(engines);
  
      var emailToSend = new NewRegisteredUserEmail
      {
          To = email, UserName = username, CallbackUrl = callbackUrl 
      };
  
      emailService.Send(emailToSend);
  }
  </code></pre>
  
  <p>I cannot debug the NotifyRegistration method. I don't know why. I am using Postal, so EmailService is not my implementation. Here how I configured the smtp service:</p>
  
  <pre><code>&lt;system.net&gt;
    &lt;mailSettings&gt;
      &lt;smtp deliveryMethod="Network"&gt;
        &lt;network host="smtp.live.com" port="25" enableSsl="true" userName="***" password="***"&gt;&lt;/network&gt;
      &lt;/smtp&gt;
    &lt;/mailSettings&gt;
  &lt;/system.net&gt;
  </code></pre>
  
  <p>If I run the hangfire dashboard I see the jobs enqued</p>
  
  <p><a href="https://i.stack.imgur.com/W8FbF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W8FbF.png" alt="enter image description here"></a></p>
  
  <p>But nothing else happened.
  What do I miss to send the email?</p>
  
  <p>Thank you</p>
  
  <p><strong>UPDATE</strong>
  In the startup.cs I have written this:</p>
  
  <pre><code>var options = new SqlServerStorageOptions
  {
      QueuePollInterval = TimeSpan.FromSeconds(1)
  };
  
  GlobalConfiguration.Configuration
       .UseSqlServerStorage("DbConnectionString", options)
       .UseFilter(new LogEmailFailureAttribute());
  
   app.UseHangfireDashboard();
   app.UseHangfireServer();
  </code></pre>
  
  <p><strong>UPDATE 2</strong>
  I transformed my NotifyRegistration in this way:</p>
  
  <pre><code>[AutomaticRetry(Attempts = 5)]
  public async Task NotifyRegistration(string userId, string username, string email, EmailService emailService)
  {
      //I calculate callbackUrl
  
      var emailToSend = new NewRegisteredUserEmail
      {
          To = email, UserName = username, CallbackUrl = callbackUrl 
      };
  
      emailService.Send(emailToSend);
  }
  </code></pre>