public MailgunMailerOptions Create()
        {
            var server               = new Uri(_configuration["Mailgun:Server"]);
            var userName             = _configuration["mailgunuser"];
            var password             = _configuration["mailgunkey"];
            var domain               = _configuration["Mailgun:Domain"];
            var credentials          = new MailgunMailerCredentials(userName, password);
            var mailgunMailerOptions = new MailgunMailerOptions(server, credentials, domain);

            return(mailgunMailerOptions);
        }
Exemplo n.º 2
0
 public MailgunMailerOptions(Uri server, MailgunMailerCredentials credentials, string domain)
 {
     Server      = server ?? throw new ArgumentNullException(nameof(server));
     Credentials = credentials ?? throw new ArgumentNullException(nameof(credentials));
     Domain      = domain ?? throw new ArgumentNullException(nameof(domain));
 }