Skip to content

Added IncomingMailgun

Compare
Choose a tag to compare
@twof twof released this 01 May 01:18
· 96 commits to master since this release

Enables easy decoding of forwarded emails from Mailgun

mailgunGroup.post("all") { (req) -> Future<String> in
    do {
        return try req.content.decode(IncomingMailgun.self).map { (incomingMail) in
            return "Hello"
        }
    } catch {
        throw Abort(HTTPStatus.internalServerError, reason: "Could not decode incoming Mailgun")
    }
}