SwiftMailgun 1.0.1

SwiftMailgun 1.0.1

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2017年9月
SwiftSwift 版本3.0
SPM支持 SPM

Chris Jimenez 维护。



 
依赖项
ObjectMapper>= 0
Alamofire>= 0
 

SwiftMailgun

SwiftMailgun 在您需要使用 iOS 应用程序通过 MailGun 发送电子邮件时提供了简单的替代方案。

为什么?

有时,您需要在 iOS 应用程序中设置简单的电子邮件表单,或者在执行某个操作后触发电子邮件,而无需为该服务设置您自己的服务,有时您不想使用 MailComposeViewController 或使用 SMTP 库。当您需要使用 iOS 应用程序发送电子邮件时,这提供了一种简单的替代方案。

✉️Mailgun

Mailgun 提供了一种简单的可靠的 API,用于发送事务性电子邮件。您将需要一个 ApiKey 和账户才能使用此客户端。

:octocat: 安装

在 CocoaPods 上获取 SwiftMailgun,只需在 Podfile 中添加 pod 'SwiftMailgun'

🎓使用方法

使用方法非常简单

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

}

🔧TODO

  • 多收件人
  • 添加附件
  • 添加其他 API 设置,如跟踪、标签等
  • Carthage 支持

✌️许可证

MIT

👽作者

Chris Jimenez - http://chrisjimenez.net@chrisjimeneznat