TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Chris Jimenez.
Depends on: | |
ObjectMapper | >= 0 |
Alamofire | >= 0 |
SwiftMailgun provides simple alternative when you need to send an email with your iOS app using MailGun.
Sometimes, there is the need to setup a simple email form in your iOS app, or trigger an email after an action, without having to setup your own service for that, sometimes you don’t want to use the MailComposeViewController
or use a SMTP
library. This provide a simple alternative when you need to send an email with your iOS app.
Mailgun provides a simple reliable API for transactional emails. You will need to have a ApiKey
and account account to use the client.
Get SwiftMailgun
on CocoaPods, just add pod 'SwiftMailgun'
to your Podfile.
Usage is very simple
import SwiftMailgun
let mailgun = MailgunAPI(apiKey: "YouAPIKey", clientDomain: "yourDomain.com")
mailgun.sendEmail(to: "[email protected]", from: "Test User <[email protected]>", subject: "This is a test", bodyHTML: "<b>test<b>") { mailgunResult in
if mailgunResult.success{
print("Email was sent")
}
}
MIT
Chris Jimenez - http://chrisjimenez.net, @chrisjimeneznat