예제 #1
0
        public Task <Response> SendAdfEmail(List <EmailAddress> emailTo, IEmailTemplate emailTemplate)
        {
            SendGridMessage sendGridMessage = new SendGridMessage();

            sendGridMessage.SetFrom(EmailFrom);
            sendGridMessage.SetGlobalSubject(AdfEmailSubject);
            if (!string.IsNullOrEmpty(emailTemplate.AsPlainText()))
            {
                sendGridMessage.AddContent("text/plain", emailTemplate.AsPlainText());
            }

            for (int personalizationIndex = 0; personalizationIndex < emailTo.Count; ++personalizationIndex)
            {
                sendGridMessage.AddTo(emailTo[personalizationIndex], personalizationIndex);
            }

            return(SendGridClient.SendEmailAsync(sendGridMessage));
        }
예제 #2
0
        public Task <Response> SendCompleteBookingEmail(EmailAddress emailTo, IEmailTemplate emailTemplate)
        {
            SendGridMessage message = MailHelper.CreateSingleEmail(EmailFrom, emailTo, CompleteBookingSubject, emailTemplate.AsPlainText(), emailTemplate.AsHtml());

            return(SendGridClient.SendEmailAsync(message));
        }
예제 #3
0
        public Task <Response> SendExpertNotificationEmail(List <EmailAddress> emailTo, IEmailTemplate emailTemplate)
        {
            SendGridMessage message = MailHelper.CreateSingleEmailToMultipleRecipients(EmailFrom, emailTo, NewLeadNotificationSubject, emailTemplate.AsPlainText(), emailTemplate.AsHtml());

            return(SendGridClient.SendEmailAsync(message));
        }
예제 #4
0
        public Task <Response> SendDealerInvitationEmail(EmailAddress emailTo, IEmailTemplate emailTemplate)
        {
            SendGridMessage message = MailHelper.CreateSingleEmail(EmailFrom, emailTo, DealerInvitationSubject, emailTemplate.AsPlainText(), emailTemplate.AsHtml());

            return(SendGridClient.SendEmailAsync(message));
        }