Exemplo n.º 1
0
        public static IEmailProvider getEmailInstance(EmailEnum emailProvider)
        {
            IEmailProvider _emailProvider;

            switch (emailProvider.ToString())
            {
            case "MailGun":
                _emailProvider = new MailGunProvider();
                break;

            case "SendGrid":
                _emailProvider = new SendGridProvider();
                break;

            default:
                _emailProvider = new SendGridProvider();
                break;
            }
            return(_emailProvider);
        }
Exemplo n.º 2
0
 public MailGunEmailService(ILogger <MailGunException> logger)
 {
     this.logger          = logger;
     this.mailGunProvider = new MailGunProvider();
 }