Skip to content
Interact with third-party iOS mail clients, using custom URL schemes.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example Add Swift Package Manager manifest, update folders structure Oct 8, 2019
Sources/ThirdPartyMailer Clean code Oct 16, 2019
Tests/ThirdPartyMailerTests Add open URL unit test Oct 16, 2019
.gitignore Update to Swift 3.2, bump to version 1.1 May 15, 2018
.travis.yml Update Travis configuration Oct 8, 2019 Bump to version 1.6 Oct 18, 2019
LICENSE.txt Update license file extension Oct 8, 2019
Package.swift Clean code Oct 16, 2019 Bump to version 1.6 Oct 18, 2019
ThirdPartyMailer.podspec.json Bump to version 1.6 Oct 18, 2019


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

Platform iOS Swift 5 Build Status Swift Package Manager CocoaPods 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

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:


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)


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


ThirdPartyMailer was created by Vincent Tourraine.


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

You can’t perform that action at this time.