Git Product home page Git Product logo

kamailgun-swift's Introduction

Mailgun-In-Swift

CocoaPods GitHub License Swift 4

Mailgun-In-Swift provides simple alternative APIs when you need to send an email with your iOS app using Mailgun.

โ“ Why?

For developing iOS App, we need to send a email in background without any action sometimes. Or there is the need to send a simple email instead of using MailComposeViewController or SMTP libray. In these cases, sending emails using Mailgun is a better option. This project help you simplify the original Mailgun APIs and provide you a simple alternative in Swift.

๐Ÿ“ง 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 Mailgun-In-Swift on CocoaPods, just add pod 'Mailgun-In-Swift' to your Podfile.

๐ŸŽ“ Usage

Usage is very simple

import Mailgun-In-Swift

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

}

โœŒ๏ธ License

MIT

๐Ÿ‘ฝ Author

Ao Zhang - https://kevinao.com

kamailgun-swift's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kamailgun-swift's Issues

Module name

Hello!
Just pointing this up, when I installed and tried to import it, instead of: import Mailgun-In-Swift it was:

import Mailgun_In_Swift

Perhaps we should update README.md file.

Doesn't compile with latest Almofire

This doesn't compile with latest almofire

error in MailgunAPI.swift: sendEmail:
MailgunAPI.swift:95:9: Module 'Alamofire' has no member named 'upload'

This is fixed by changing "Almofire" to "AF"

but then there is another error as the Almofire API has changed
MailgunAPI.swift:103:103: Extra argument 'encodingCompletion' in call

don't know how to fix that.

Reducing the minimum deployment target for iOS

Hey,
I noticed that you set the minimum target dependency for this at iOS 11.0. Does this pod really require iOS 11? If not, can you reset the target to something lower and push it to cocoapods? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.