From 8d91b5b372d6eb38e327bf4754fdd5ba17530a1c Mon Sep 17 00:00:00 2001 From: Lin Zhan Date: Wed, 25 Mar 2015 17:45:24 +0800 Subject: Update MCIMAPSession.cpp if mail server host is 163.com, 126.com or yeah.net, set mNetEaseWorkaroundEnabled = true. --- src/core/imap/MCIMAPSession.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core/imap') 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() -- cgit v1.2.3