[![CI Status](http://img.shields.io/travis/Troy Zhang/MailUtil.svg?style=flat)](https://travis-ci.org/Troy Zhang/MailUtil)
As you known, skpsmtpmessage
could not send email in concurrent order. MailUtil
is a tool that wrap skpsmtpmessage
to send emails in serial order. Thanks for the article Sending Mails in Serial Order using GCD.
To run the example project, clone the repo, and run pod install
from the Example directory first.
iOS7+
MailUtil is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MailUtil", :git => 'https://github.com/troyz/MailUtil.git', :tag => '0.1.0'
// please correct it.
[SendEmailOperation setupConfigWithServer:@"smtp.163.com" withFrom:@"[email protected]" withLogin:@"[email protected]" withPassword:@"**********"];
// the attachment file path
NSString *path = [[NSBundle mainBundle] pathForResource:@"[email protected]" ofType:nil];
// a message that will be sent
SendEmailOperation *operation = [[SendEmailOperation alloc] initWithTo:@"[email protected]" subject:@"Hello" body:@"World" path:path];
// send the message
[SendEmailOperation sendEmail:operation];
Troy Zhang, [email protected]
MailUtil is available under the MIT license. See the LICENSE file for more info.