aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Lin Zhan <zhanleewo@gmail.com>2015-03-25 17:45:24 +0800
committerGravatar Lin Zhan <zhanleewo@gmail.com>2015-03-25 17:45:24 +0800
commit8d91b5b372d6eb38e327bf4754fdd5ba17530a1c (patch)
treee7fa28114107e449860450be3ba414f92c548fa6
parent895bc620443834979fb03f34270954566d77fd3e (diff)
Update MCIMAPSession.cpp
if mail server host is 163.com, 126.com or yeah.net, set mNetEaseWorkaroundEnabled = true.
-rwxr-xr-xsrc/core/imap/MCIMAPSession.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp
index 1906485b..537692db 100755
--- a/src/core/imap/MCIMAPSession.cpp
+++ b/src/core/imap/MCIMAPSession.cpp
@@ -381,6 +381,13 @@ IMAPSession::~IMAPSession()
void IMAPSession::setHostname(String * hostname)
{
MC_SAFE_REPLACE_COPY(String, mHostname, hostname);
+
+ if(!mNetEaseWorkaroundEnabled && hostname && (hostname->hasSuffix(String::stringWithUTF8Characters((char *) "@163.com"))
+ || hostname->hasSuffix(String::stringWithUTF8Characters((char *) "@126.com"))
+ || hostname->hasSuffix(String::stringWithUTF8Characters((char *) "@yeah.net"))
+ )) {
+ mNetEaseWorkaroundEnabled = true;
+ }
}
String * IMAPSession::hostname()