Skip to content

Commit

Permalink
Added required region parameter to mailgun initializer.
Browse files Browse the repository at this point in the history
  • Loading branch information
AirZona committed Sep 3, 2019
1 parent 71e08e8 commit 177a2fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/MailCore/MailCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
Expand Down

0 comments on commit 177a2fa

Please sign in to comment.