aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2016-05-11 23:39:28 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2016-05-11 23:39:28 -0700
commitc9ab1686579a7368d9a81335160d563186cdfbdc (patch)
tree19b9d4168ade5874c43465db8d34eabe673c4ae0
parent5c856703c1a1683fd5494e7e584bd214bcc3990a (diff)
Added error code
-rw-r--r--src/core/abstract/MCErrorMessage.cpp1
-rw-r--r--src/core/abstract/MCMessageConstants.h3
-rwxr-xr-xsrc/core/imap/MCIMAPSession.cpp3
-rw-r--r--src/objc/abstract/MCOConstants.h2
4 files changed, 8 insertions, 1 deletions
diff --git a/src/core/abstract/MCErrorMessage.cpp b/src/core/abstract/MCErrorMessage.cpp
index 2f3d2c98..d6b11a29 100644
--- a/src/core/abstract/MCErrorMessage.cpp
+++ b/src/core/abstract/MCErrorMessage.cpp
@@ -49,6 +49,7 @@ static const char * localizedDescriptionTable[] = {
"Error while running custom command", /** MCOErrorCustomCommand */
"Cannot send message due to possible spam detected by server", /** MCOErrorSendMessageSpamSuspected */
"User is over the limit for messages allowed to be sent in a single day", /** MCOErrorSendMessageDailyLimitExceeded */
+ "The user needs to log in via the web browser", /** MCOErrorOutlookLoginViaWebBrowser */
};
String * mailcore::errorMessageWithErrorCode(ErrorCode errorCode)
diff --git a/src/core/abstract/MCMessageConstants.h b/src/core/abstract/MCMessageConstants.h
index 10a52d5b..9cb98b30 100644
--- a/src/core/abstract/MCMessageConstants.h
+++ b/src/core/abstract/MCMessageConstants.h
@@ -256,7 +256,8 @@ namespace mailcore {
ErrorNoValidServerFound,
ErrorCustomCommand,
ErrorYahooSendMessageSpamSuspected,
- ErrorYahooSendMessageDailyLimitExceeded
+ ErrorYahooSendMessageDailyLimitExceeded,
+ ErrorOutlookLoginViaWebBrowser,
};
enum PartType {
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp
index 9847d1cf..a09172ec 100755
--- a/src/core/imap/MCIMAPSession.cpp
+++ b/src/core/imap/MCIMAPSession.cpp
@@ -863,6 +863,9 @@ void IMAPSession::login(ErrorCode * pError)
else if (response->locationOfString(MCSTR("OCF12")) != -1) {
* pError = ErrorYahooUnavailable;
}
+ else if (response->locationOfString(MCSTR("Login to your account via a web browser")) != 1) {
+ * pError = ErrorOutlookLoginViaWebBrowser;
+ }
else {
* pError = ErrorAuthentication;
}
diff --git a/src/objc/abstract/MCOConstants.h b/src/objc/abstract/MCOConstants.h
index 05e6f00f..b2a890ab 100644
--- a/src/objc/abstract/MCOConstants.h
+++ b/src/objc/abstract/MCOConstants.h
@@ -419,6 +419,8 @@ typedef NS_ENUM(NSInteger, MCOErrorCode) {
MCOErrorYahooSendMessageSpamSuspected,
/** Daily limit of sent messages was hit */
MCOErrorYahooSendMessageDailyLimitExceeded,
+ /** You need to login via the web browser first */
+ MCOErrorOutlookLoginViaWebBrowser,
/** The count of all errors */
MCOErrorCodeCount,
};