Ejemplo n.º 1
0
        public static async Task <Response> SendEmailForm(EmailMsg emailMsg)
        {
            var client   = new SendGridClient(APIKeys.SendGridKey);
            var from     = new EmailAddress(EmailInfo.From);
            var to       = new EmailAddress(EmailInfo.To);
            var subject  = emailMsg.GetHeading();
            var body     = $"{EmailInfo.UserName}\n{EmailInfo.ComputerName}\n{EmailInfo.UserEmail}\n{emailMsg.GetBody()}";
            var htmlBody = $"<strong>{body}</strong>";
            var msg      = MailHelper.CreateSingleEmail(from, to, subject, body, htmlBody);

            return(await client.SendEmailAsync(msg));
        }
Ejemplo n.º 2
0
 public Email(EmailMsg emailMsg)
 {
 }