Skip to content

Interact with third-party iOS mail clients, using custom URL schemes. (Object C Version)

License

Notifications You must be signed in to change notification settings

Seoras/ThirdPartyMailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ThirdPartyMailer (Objective C version)

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

For the Swift version follow this link.

Platform iOS MIT license

Supported mail clients

Client URL Scheme App Store
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
Protonmail protonmail 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 Swift ObjC.

How to install

Manually import the files from the Source folder. For Pod install use:

pod 'ThirdPartyMailerObjC', :git => 'https://github.com/Seoras/ThirdPartyMailer.git'

Open your App's info.plist file and add the key "LSApplicationQueriesSchemes", or update it, with the all the schemes found in ThirdPartyMailer.plist. e.g.

<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>googlegmail</string>
		<string>readdle-spark</string>
		<string>x-dispatch</string>
		<string>airmail</string>
		<string>ms-outlook</string>
		<string>ymail</string>
		<string>fastmail</string>
		<string>protonmail</string>
	</array>

How to use

Getting the list of available clients:

NSArray *otherMailApps = [ThirdPartyMailer availableClients];

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

[ThirdPartyMailer openMailClient:client
                       recipient:@"[email protected]"
                         subject:@"FooBar"
                            body:@"Dear Foobar, ..." 
                      completion:^(BOOL success){
                                    NSLog(@"Email sent using %@",client.name);
                                }];

Requirements

ThirdPartyMailer (ObjC) is written in Objective C, requires iOS 8.0 and above, Xcode 8.0 and above.

Credits

ThirdPartyMailer (Swift) was created by Vincent Tourraine.

ThirdPartyMailer port to Objective C was created by George Taylor.

License

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

About

Interact with third-party iOS mail clients, using custom URL schemes. (Object C Version)

Resources

License

Stars

Watchers

Forks

Packages

No packages published