CGLMail 0.1.1

CGLMail 0.1.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Chris Ladd.



CGLMail 0.1.1

CGLMail makes it easy to send email from any class in your app, without implementing the MFMailComposeViewControllerDelegate protocol all over the place. It was initially written to centralize the submission of feedback emails into one class.

Usage

If you're using cocoapods like you should, add CGLMail to your podfile:

pod 'CGLMail', '~> 0.1'

For example, you can get a view controller to send an email like so:

UIViewController *mailVC = [CGLMailHelper mailViewControllerWithRecipients:@[@"[email protected]"] 
                                                                   subject:@"Hi Mom!" 
                                                                   message:@"Hi Mom, \n\nJust wanted to check in and say hello!\n\nLove, \nChris" 
                                                                    isHTML:NO 
                                                            includeAppInfo:NO 
                                                                completion:nil];

Which would end up looking somthing like this:

Support Screenshot

Or, to generate a user support email, with diagnostic info about the user's app and device:

UIViewController *mailVC = [CGLMailHelper supportMailViewControllerWithRecipient:@"[email protected]" 
                                                                         subject:@"Support Email" 
                                                                      completion:nil];

Which would yield a view controller that looks like this:

Support Screenshot