Latest 1.0.1
Homepage https://github.com/PiXeL16/SwiftMailgun
License MIT
Platforms ios 8.0, requires ARC
Dependencies ObjectMapper, Alamofire
Authors

Cocoapods Compatible GitHub license
Swift 3

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 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


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")
  }

}

: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

beer: Donate

If you want to buy me a beer, you can donate to my coin addresses below:

BTC

1BeGBew4CBdLgUSmvoyiU1LrM99GpkXgkj

ETH

0xa59a3793E3Cb5f3B1AdE6887783D225EDf67192d

LTC

Ld6FB3Tqjf6B8iz9Gn9sMr7BnowAjSUXaV

Latest podspec

{
    "name": "SwiftMailgun",
    "version": "1.0.1",
    "summary": "A simple alternative when you need to send an email with your iOS app using MailGun.",
    "description": "SwiftMailgun provides simple alternative when you need to send an email with your iOS app using MailGun.",
    "homepage": "https://github.com/PiXeL16/SwiftMailgun",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Chris Jimenez": "[email protected]"
    },
    "social_media_url": "http://twitter.com/chrisjimeneznat",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/PiXeL16/SwiftMailgun.git",
        "tag": "1.0.1"
    },
    "source_files": [
        "SwiftMailgun/",
        "SwiftMailgun/**/*.{h,m,swift}"
    ],
    "requires_arc": true,
    "dependencies": {
        "ObjectMapper": [],
        "Alamofire": []
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This