title: UserManager.SendEmailAsync doesnt send
body: <p>I'm trying to send an email with SmtpClient.SendMailAsync and it doesn't work although the synchronous version works (SmtpClient.Send).</p>
  
  <p>My synchronous code :</p>
  
  <pre><code>            MailMessage msg = new MailMessage();
              msg.To.Add(new MailAddress("someEmail@gmail.com", "SomeOne"));
              msg.From = new MailAddress("no-reply@group.com", "You2");
              msg.Subject = "This is a Test Mail";
              msg.Body = "This is a test message";
              msg.IsBodyHtml = true;
  
              SmtpClient client = new SmtpClient();
              client.UseDefaultCredentials = true;
              client.Port = 25; 
              client.Host = "mail.group.com";
              client.DeliveryMethod = SmtpDeliveryMethod.Network;
              client.EnableSsl = true;
              client.Send(msg);
  </code></pre>
  
  <p>My asynchronous email code (I just modified the EmailService : IIdentityMessageService class) :</p>
  
  <pre><code>public Task SendAsync(IdentityMessage message)
  {
  
      const string sentFrom = "support@group.com";
  
      // Configure the client:
      var client = new SmtpClient("mail.group.com")
      {
          Port = 25,
          DeliveryMethod = SmtpDeliveryMethod.Network,
          UseDefaultCredentials = true,
          EnableSsl = true
      };
  
      // Create the message:
      var mail = new MailMessage(sentFrom, message.Destination, message.Subject, message.Body);
  
      // Send:
      return client.SendMailAsync(mail);
  }
  </code></pre>
  
  <p>Edit : the calling code is generated by Visual Studio, here it is :</p>
  
  <pre><code>public async Task&lt;ActionResult&gt; Register(RegisterViewModel model)
          {
              if (ModelState.IsValid)
              {
                  var user = new ApplicationUser { UserName = model.Email, Email = model.Email };
                  var result = await UserManager.CreateAsync(user, model.Password);
                  if (result.Succeeded)
                  {
                      await SignInManager.SignInAsync(user, isPersistent:false, rememberBrowser:false);
  
                      // Send an email with this link
                       string code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id);
                       var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme);
                       await UserManager.SendEmailAsync(user.Id, "Confirmer votre compte", "S'il vous plaît, cliquez le lien suivant :  &lt;a href=\"" + callbackUrl + "\"&gt;Activation&lt;/a&gt;");
  
                      return RedirectToAction("Index", "Home");
                  }
                  AddErrors(result);
              }
  
              // If we got this far, something failed, redisplay form
              return View(model);
          }
  </code></pre>