Swiftpack.co - Package - vtourraine/ThirdPartyMailer

ThirdPartyMailer

Interact with third-party iOS mail clients, using custom URL schemes.

Platform iOS Swift 5 Build Status Swift Package Manager CocoaPods compatible Carthage Compatible MIT license

Supported mail clients

Client | URL Scheme | App Store ------------------ | --------------- | --------- Sparrow | sparrow | discontinued Gmail | googlegmail | link Dispatch | x-dispatch | link Spark | readdle-spark | link Airmail | airmail | link Microsoft Outlook | ms-outlook | link Yahoo Mail | ymail | link Fastmail | fastmail | link

Unfortunately, not all mail clients offer URL schemes to be supported by ThirdPartyMailer. If you’re aware of another candidate, please let us know.

How to install

Swift Package Manager

In Xcode, click on the “File” menu, “Swift Packages”, “Add Package Dependency…”, then enter the URL for this repo: https://github.com/vtourraine/ThirdPartyMailer.git.

CocoaPods

With CocoaPods, simply add ThirdPartyMailer to your Podfile:

pod 'ThirdPartyMailer'

Or, you can manually import the files from the Sources folder.

How to use

Getting the list of supported clients

let clients = ThirdPartyMailClient.clients()

Testing the client availability (i.e. if the app is installed)

⚠️ In order to test the client availability, your app needs to declare the relevant URL scheme in its Info.plist file, by adding a LSApplicationQueriesSchemes array. You can find an example here, or check out the documentation.

let application = UIApplication.shared

if ThirdPartyMailer.application(application, isMailClientAvailable: client) {
    // ...
}

Opening the client (with optional message recipient, subject, and body)

let application = UIApplication.shared

ThirdPartyMailer.application(application, openMailClient: client, recipient: nil, subject: nil, body: nil)

Requirements

ThirdPartyMailer is written in Swift 5.0, requires iOS 9.0 and above, Xcode 10.2 and above.

Credits

ThirdPartyMailer was created by Vincent Tourraine.

License

ThirdPartyMailer is available under the MIT license. See the LICENSE file for more info.

Github

link
Stars: 89

Dependencies

Used By

Total: 0

Releases

ThirdPartyMailer 1.7.1 - 2020-10-07 14:45:56

  • Update deployment target to iOS 9

ThirdPartyMailer 1.7 - 2019-12-03 10:37:37

  • Add Fastmail support

ThirdPartyMailer 1.6 - 2019-10-18 08:19:02

  • Add open client method (#10, #13)

ThirdPartyMailer 1.5 - 2019-10-16 17:53:28

  • Add Swift Package Manager support

ThirdPartyMailer 1.4 - 2019-10-16 17:53:04

  • Update to Swift 5.0

ThirdPartyMailer 1.3 - 2018-09-19 08:45:55

  • Update to Swift 4.2

ThirdPartyMailer 1.2 - 2018-05-15 11:34:52

  • Add Microsoft Outlook support
  • Add Yahoo Mail support

ThirdPartyMailer 1.1 - 2018-05-15 11:11:35

  • Update to Swift 3.2

ThirdPartyMailer 1.0 - 2017-06-08 09:01:47

  • Update to Swift 3

ThirdPartyMailer 0.1.1 - 2016-04-26 21:41:26

  • Add documentation

ThirdPartyMailer 0.1 - 2016-04-12 11:45:11

Initial release