Oggerschummer / ThirdPartyMailer

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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. Pod support maybe added later.

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>
	</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:@"you@foobar.com"
                         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)

License:MIT License


Languages

Language:Objective-C 100.0%