public MailjetService(MailjetOptions options, IHostingEnvironment env)
        {
            _env    = env;
            _client = new MailjetClient(options.ApiKeyPublic, options.ApiKeyPrivate)
            {
                Version = ApiVersion.V3_1
            };
            _senderEmail = options.SenderEmail;
            _senderName  = options.SenderName;

            // Used in dev environnement only
            _enableMailjetInDevEnv = options.EnableMailjetInDevEnv;
            _sendMailToInDevEnv    = options.SendMailToInDevEnv;
        }
Beispiel #2
0
        public MailjetService(MailjetOptions options)
        {
            _clientV3_1 = new MailjetClient(options.ApiKeyPublic, options.ApiKeyPrivate)
            {
                Version = ApiVersion.V3_1
            };
            _clientV3 = new MailjetClient(options.ApiKeyPublic, options.ApiKeyPrivate)
            {
                Version = ApiVersion.V3
            };
            _senderEmail = options.SenderEmail;
            _senderName  = options.SenderName;

            _testingRedirectionMail = options.TestingRedirectionMail;
            _isSendingMailAllowed   = options.IsSendingMailAllowed ?? true;
        }