Comments (9)
It's authentication error:
Domain=MCOErrorDomain Code=5 "The operation couldn’t be completed. (MCOErrorDomain error 5.)
Could you try the following?
MCOAuthTypeSASLPlain (or MCOAuthTypeSASLLogin) instead of (MCOAuthTypeSASLPlain | MCOAuthTypeSASLLogin)?
from mailcore2.
Yes, tried all combinations for the SMTP authType. It does work on the simulator, but not on the device.
from mailcore2.
I can confirm this from my end as well. Works on simulator, not device. I'll keep digging for more info.
from mailcore2.
I'm not currently able to investigate on device.
Can someone investigate by setting the following function?
extern void (* mailstream_logger_id)(mailstream_low * s, int is_stream_data, int direction,
const char * str, size_t size);
(see libetpan headers <libetpan/mailstream.h>)
and set mailstream_debug = 1 before login in.
void my_logger(mailstream_low * s, int is_stream_data, int direction,
const char * str, size_t size)
{
fprintf(stderr, "%i: %.*s\n\n", direction, size, str);
}
{
mailstream_debug = 1;
mailstream_logger_id = my_logger;
// ...
}
And let me know what the output of the console is.
I think there might be an issue with SASL failing.
I'd need to dig more.
from mailcore2.
It's an issue in Cyrus SASL 2.1.25.
I fixed it.
You need to clean prebuilt, libetpan, libetpan-ios and libsasl-ios in mailcore2/Externals folder and rebuild.
Re-open if you still have the issue.
from mailcore2.
Thanks Dinh, your fix worked.
from mailcore2.
I have SMTP issue with some device.
I have two devices to test.
One is iPad 2 (iOS 8.1) and iPad mini 2 (Retina) (8.1)
IMAP is OK, but SMTP is something wrong in iPad mini 2.
Simulator is always OK. iPad 2 (iOS 8.1) is always OK.
I got this error in iPad mini 2.
Error sending email:Error Domain=MCOErrorDomain Code=30 "An error occured while sending the message." UserInfo=0x171074ec0 {NSLocalizedDescription=An error occured while sending the message.}
I tested with gmail, yahoo, aol and hotmail. (all the same)
Someone help me?
Thanks.
from mailcore2.
Could you ask your question on stack overflow? We'll answer here. Thanks.
from mailcore2.
@younghwanglocalspace
Hello, I want to ask, I use an error on the equipment of xcode6.1 iOS8.1 imap, I posted code and error message, please correct me or please let us know where to find the solutions of the related content, thank you
self.imapSession = [[MCOIMAPSession alloc] init];
self.imapSession.hostname = hostname;
self.imapSession.port = 993;
self.imapSession.username = username;
self.imapSession.password = password;
self.imapSession.authType= MCOAuthTypeSASLLogin;
if (oauth2Token != nil) {
self.imapSession.OAuth2Token = oauth2Token;
self.imapSession.authType = MCOAuthTypeXOAuth2;
}
self.imapSession.connectionType = MCOConnectionTypeTLS;
MasterViewController * __weak weakSelf = self;
self.imapSession.connectionLogger = ^(void * connectionID, MCOConnectionLogType type, NSData * data) {
@synchronized(weakSelf) {
if (type != MCOConnectionLogTypeSentPrivate) {
NSLog(@"event logged:%p %i withData: %@", connectionID, type, [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
}
}
};
// Reset the inbox
self.messages = nil;
self.totalNumberOfInboxMessages = -1;
self.isLoading = NO;
self.messagePreviews = [NSMutableDictionary dictionary];
[self.tableView reloadData];
NSLog(@"checking account");
self.imapCheckOp = [self.imapSession checkAccountOperation];
[self.imapCheckOp start:^(NSError *error) {
MasterViewController *strongSelf = weakSelf;
NSLog(@"finished checking account.");
if (error == nil) {
[strongSelf loadLastNMessages:NUMBER_OF_MESSAGES_TO_LOAD];
} else {
NSLog(@"error loading account: %@", error);
}
strongSelf.imapCheckOp = nil;
}];
Error message is:
event logged:0x14db6ae0 0 withData: * OK [CAPABILITY IMAP4 IMAP4rev1 IDLE XAPPLEPUSHSERVICE ID UIDPLUS AUTH=LOGIN NAMESPACE] QQMail IMAP4Server ready
2015-02-12 11:20:53.059 MailCoreTest[6472:2620896] event logged:0x14db6ae0 0 withData: + VXNlciBOYW1lAA==
2015-02-12 11:21:07.264 MailCoreTest[6472:2620896] event logged:0x14db6ae0 0 withData: + UGFzc3dvcmQA
2015-02-12 11:21:07.370 MailCoreTest[6472:2620896] event logged:0x14db6ae0 0 withData: (null)
2015-02-12 11:21:07.373 MailCoreTest[6472:2620864] finished checking account.
2015-02-12 11:21:07.374 MailCoreTest[6472:2620864] error loading account: Error Domain=MCOErrorDomain Code=5 "Unable to authenticate with the current session's credentials." UserInfo=0x14db9c40 {NSLocalizedDescription=Unable to authenticate with the current session's credentials.
from mailcore2.
Related Issues (20)
- Please include CVE-2021-26911 fix in an "official" release/tag
- Concurrency - overall ability to send multiple mails in a faster pace.
- swift package from master branch is crashing HOT 1
- [Qequstion] - In mailCore2, use the following code to access email 163,How to do in mailCore1.0? HOT 2
- [Bug] - Android Build failed HOT 2
- Error when installing mailcore2-ios using CocoaPods HOT 5
- Need amd64 target for Swift Package and Cocoapod HOT 2
- [Bug] - iOS app crash HOT 23
- [Bug] - iOS: Thread not released by IMAP Session (each session allocates 560KB = standard thread side)
- [Bug] - Building on Linux fedora HOT 1
- [Bug] - Check connection is not printing any output HOT 2
- [Bug] - Archive Failed in build-mailcore2-xcframework-spm.sh HOT 1
- [Bug] - Kelvin John
- [Bug] - Austin's <android>
- [Bug] - HOT 1
- [Bug] - App Crash on 'fetchMessagesByUIDOperationWithFolder:requestKind:uids: HOT 1
- [Bug] - 'libetpan/libetpan.h' file not found in iOS project
- [Question] - TLS version?
- Having issues adding MailCore2 via SPM to iOS project
- [Bug] - Unknown mailsmtp error 27 (SSL Error) when adding IMAP/SMTP account HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailcore2.