From 177a2fadb9a8b9a20d52830aec6295c5fdc1c61b Mon Sep 17 00:00:00 2001 From: Tom Smallwood Date: Tue, 3 Sep 2019 10:06:04 -0700 Subject: [PATCH] Added required region parameter to mailgun initializer. --- Sources/MailCore/MailCore.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/MailCore/MailCore.swift b/Sources/MailCore/MailCore.swift index 29edbd2..4571c30 100644 --- a/Sources/MailCore/MailCore.swift +++ b/Sources/MailCore/MailCore.swift @@ -53,7 +53,7 @@ public class Mailer: MailerService { /// Service configuration public enum Config { case none - case mailgun(key: String, domain: String) + case mailgun(key: String, domain: String, region: Mailgun.Region) case sendGrid(key: String) case smtp(SMTP) } @@ -69,8 +69,8 @@ public class Mailer: MailerService { self.config = config switch config { - case .mailgun(let key, let domain): - services.register(Mailgun(apiKey: key, domain: domain), as: Mailgun.self) + case .mailgun(let key, let domain, let region): + services.register(Mailgun(apiKey: key, domain: domain, region: region), as: Mailgun.self) case .sendGrid(key: let key): let config = SendGridConfig(apiKey: key) services.register(config)