Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/infinitepower18/emailclienthelper

Swift helper package to send an email using 3rd party apps
https://github.com/infinitepower18/emailclienthelper

ios swift swift5 swift6 visionos

Last synced: 5 days ago
JSON representation

Swift helper package to send an email using 3rd party apps

Awesome Lists containing this project

README

        

[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Finfinitepower18%2FEmailClientHelper%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/infinitepower18/EmailClientHelper)
![GitHub](https://img.shields.io/github/license/infinitepower18/emailclienthelper)

# EmailClientHelper
A simple helper package to send an email using 3rd party email clients. Supported clients include Gmail, Outlook and Yahoo Mail.

Currently, the package only supports iOS and visionOS.

You will also need to add this in your app's `Info.plist`:

```
LSApplicationQueriesSchemes

googlegmail
ms-outlook
ymail

```

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F1F1K06VY)

## Usage

To check if the Gmail app is available on the user's device:

``` swift
if EmailClientHelper.isClientAvailable(.gmail) {
return true
} else {
return false
}
```

To send an email using the Gmail app:

``` swift
EmailClientHelper.sendEmail(client: .gmail, to: "[email protected]")
```