Попробуйте использовать https://github.com/MailCore/mailcore2. Он асинхронный и поддерживает большинство почтовых протоколов.
Посмотрите на отправляющему Пример:
MCOSMTPSession *smtpSession = [[MCOSMTPSession alloc] init];
smtpSession.hostname = @"smtp.gmail.com";
smtpSession.port = 465;
smtpSession.username = @"[email protected]";
smtpSession.password = @"password";
smtpSession.authType = MCOAuthTypeSASLPlain;
smtpSession.connectionType = MCOConnectionTypeTLS;
MCOMessageBuilder *builder = [[MCOMessageBuilder alloc] init];
MCOAddress *from = [MCOAddress addressWithDisplayName:@"Matt R"
mailbox:@"[email protected]"];
MCOAddress *to = [MCOAddress addressWithDisplayName:nil
mailbox:@"[email protected]"];
[[builder header] setFrom:from];
[[builder header] setTo:@[to]];
[[builder header] setSubject:@"My message"];
[builder setHTMLBody:@"This is a test message!"];
NSData * rfc822Data = [builder data];
MCOSMTPSendOperation *sendOperation =
[smtpSession sendOperationWithData:rfc822Data];
[sendOperation start:^(NSError *error) {
if(error) {
NSLog(@"Error sending email: %@", error);
} else {
NSLog(@"Successfully sent email!");
}
}];
Тогда вы не используете его правильно. Можете ли вы предоставить код? что могло бы помочь. –
Теперь я использую «MFMailComposeViewController», он является частью «MessageUI.framework» http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html – aminhotob