Ejemplo n.º 1
0
        private async Task <FluentEmail.Core.Models.SendResponse> SendLoginCodeAsync(string receiver, string nickname, string code)
        {
            var email = new Email(string.Format(
                                      "code-noreply@{0}",
                                      send.Domain), "Hato Code Bot")
                        .To(receiver)
                        .Subject($"Your login code is \"{code}\"")
                        .Body(Views.LoginCodeTemplate.compiledTemplate(new { nickname, code }), true)
                        .PlaintextAlternativeBody(Views.LoginCodeTemplate.compiledTemplatePlaintext(new { nickname, code }))
            ;

            return(await send.SendEmail(email));
        }