Maily
Send email to third-party mail clients easy.
Supported clients
Client | URL Scheme |
---|---|
Gmail | googlegmail |
Dispatch | x-dispatch |
Spark | readdle-spark |
Airmail | airmail |
Microsoft Outlook | ms-outlook |
Yahoo Mail | ymail |
Installation
Manually import files from Source
folder to your project
Usage
Before start you are required to add all needed schemes to your LSApplicationQueriesSchemes
in the Info.plist file. Without this step you won't be able to find third party clients.
Code to drop into Info.plist
<key>LSApplicationQueriesSchemes</key>
<array>
<string>ymail</string>
<string>ms-outlook</string>
<string>airmail</string>
<string>readdle-spark</string>
<string>x-dispatch</string>
<string>googlegmail</string>
</array>
Present dialog to send email to available clients
Maily.shared.sendMail(recipient: "", subject: "", body: "", presentHandler: {}, cancelHandler: {})
Before this action you would probably like to check client's availability. For this you may call
Maily.shared.canSendMail
To access an available client just use
Maily.shared.clients
Localization
To localize action sheet "Cancel" button just change cancelButtonTitle
property in Maily.shared
.
Customization
Almost every class, property, and method is open
so you can just subclass or build Facade over them.
To add a new third party client you may add it to the Maily.shared.clients
, or contribute to the library.
Requirements
- iOS 10+
- Xcode 10.2+ (built for Swift 5)
Author
Ivan Smetanin, [email protected]
License
Maily is available under the MIT license. See the LICENSE file for more info.