-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
126 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
language: objective-c | ||
osx_image: xcode7.2 | ||
env: | ||
global: | ||
- LC_CTYPE=en_US.UTF-8 | ||
- LANG=en_US.UTF-8 | ||
before_install: | ||
- sudo gem install cocoapods-keys | ||
- pod keys set Mailgun_Api_Key $MailgunApiKey | ||
script: | ||
- set -o pipefail | ||
- xcodebuild -version | ||
- xcodebuild -showsdks | ||
- xcodebuild -workspace SwiftMailgun.xcworkspace -scheme "SwiftMailgun" -destination "OS=9.2,name=iPhone 6s Plus" test GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# SwiftMailgun | ||
[![Build Status](https://travis-ci.org/PiXeL16/SwiftMailgun.svg?branch=master)](https://travis-ci.org/PiXeL16/SwiftMailgun/) [![codecov.io](https://codecov.io/github/PiXeL16/SwiftMailgun/coverage.svg?branch=master)](https://codecov.io/github/PiXeL16/SwiftMailgun?branch=master) [![Cocoapods Compatible](https://img.shields.io/cocoapods/v/SwiftMailgun.svg)](https://img.shields.io/cocoapods/v/SwiftMailgun.svg) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/PiXeL16/SwiftMailgun/master/LICENSE) | ||
|
||
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 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 a `ApiKey` and account 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 <test@test.com>", 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](http://twitter.com/chrisjimeneznat) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters