Exemple #1
0
        public async Task SendEmailAsync(SendGridMessage msg, VerifyEmailObject data)
        {
            var client = new SendGridClient(SendGridApiKey);

            msg.SetTemplateData(data);

            await client.SendEmailAsync(msg);
        }
Exemple #2
0
        public async Task SendWelcomeEmail(string token, User user)
        {
            var templateId = "d-b675cd85a0aa4e84bab5929c3a015ea2";
            var msg        = EmailFunctions.GenerateMsg("*****@*****.**", "ECO Team", templateId, user.Email);

            var data = new VerifyEmailObject()
            {
                FirstName = "there"
            };

            await SendEmailAsync(msg, data);
        }