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)); }
public Email(EmailMsg emailMsg) { }