https://github.com/pixel16/swiftmailgun
SwiftMailgun provides simple alternative when you need to send an email with your iOS app using MailGun
https://github.com/pixel16/swiftmailgun
Last synced: 8 months ago
JSON representation
SwiftMailgun provides simple alternative when you need to send an email with your iOS app using MailGun
- Host: GitHub
- URL: https://github.com/pixel16/swiftmailgun
- Owner: PiXeL16
- License: mit
- Created: 2016-03-02T03:40:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-10-23T13:38:24.000Z (over 8 years ago)
- Last Synced: 2025-10-23T09:58:04.296Z (8 months ago)
- Language: Swift
- Homepage:
- Size: 41 KB
- Stars: 21
- Watchers: 3
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftMailgun
[](https://img.shields.io/cocoapods/v/SwiftMailgun.svg) [](https://raw.githubusercontent.com/PiXeL16/SwiftMailgun/master/LICENSE)
[](https://swift.org)
SwiftMailgun provides simple alternative when you need to send an email with your iOS app using MailGun.
:question: Why?
----
Sometimes, there is the need to setup a simple email form in your iOS app, or to 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.
:email: Mailgun
----
[Mailgun](https://mailgun.com) provides a simple reliable API for transactional emails. You will need to have an `ApiKey` and an account to use the client.
:octocat: Installation
----
Get `SwiftMailgun` on CocoaPods, just add `pod 'SwiftMailgun'` to your Podfile.
:mortar_board: Usage
-----
Usage is very simple
```swift
import SwiftMailgun
let mailgun = MailgunAPI(apiKey: "YouAPIKey", clientDomain: "yourDomain.com")
mailgun.sendEmail(to: "to@test.com", from: "Test User ", subject: "This is a test", bodyHTML: "test") { mailgunResult in
if mailgunResult.success{
print("Email was sent")
}
}
```
:wrench: TODO
-----
* Multiple recipients
* Add attachments
* Add other API settings like tracking, tags, etc
* Carthage support
:v: License
-------
MIT
:alien: Author
------
Chris Jimenez - http://chrisjimenez.net, [@chrisjimeneznat](http://twitter.com/chrisjimeneznat)
:beer: Donate
------
If you want to buy me a beer, you can donate to my coin addresses below:
#### BTC
1BeGBew4CBdLgUSmvoyiU1LrM99GpkXgkj
#### ETH
0xa59a3793E3Cb5f3B1AdE6887783D225EDf67192d
#### LTC
Ld6FB3Tqjf6B8iz9Gn9sMr7BnowAjSUXaV