Git Product home page Git Product logo

Comments (9)

dinhvh avatar dinhvh commented on June 14, 2024

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.

f2m2rd avatar f2m2rd commented on June 14, 2024

Yes, tried all combinations for the SMTP authType. It does work on the simulator, but not on the device.

from mailcore2.

lostincode avatar lostincode commented on June 14, 2024

I can confirm this from my end as well. Works on simulator, not device. I'll keep digging for more info.

from mailcore2.

dinhvh avatar dinhvh commented on June 14, 2024

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.

dinhvh avatar dinhvh commented on June 14, 2024

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.

f2m2rd avatar f2m2rd commented on June 14, 2024

Thanks Dinh, your fix worked.

from mailcore2.

younghwanglocalspace avatar younghwanglocalspace commented on June 14, 2024

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.

dinhvh avatar dinhvh commented on June 14, 2024

Could you ask your question on stack overflow? We'll answer here. Thanks.

from mailcore2.

camillezlh avatar camillezlh commented on June 14, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.