@@ -398,6 +398,7 @@ void IMAPSession::init()
398398 mRamblerRuServer = false ;
399399 mHermesServer = false ;
400400 mQipServer = false ;
401+ mOutlookServer = false ;
401402 mLastFetchedSequenceNumber = 0 ;
402403 mCurrentFolder = NULL ;
403404 pthread_mutex_init (&mIdleLock , NULL );
@@ -719,6 +720,7 @@ void IMAPSession::connect(ErrorCode * pError)
719720 mRamblerRuServer = (mHostname ->locationOfString (MCSTR (" .rambler.ru" )) != -1 );
720721 mHermesServer = (mWelcomeString ->locationOfString (MCSTR (" Hermes" )) != -1 );
721722 mQipServer = (mWelcomeString ->locationOfString (MCSTR (" QIP IMAP server" )) != -1 );
723+ mOutlookServer = (mHostname ->locationOfString (MCSTR (" .outlook.com" )) != -1 );
722724 }
723725
724726 mState = STATE_CONNECTED;
@@ -1989,10 +1991,8 @@ void IMAPSession::expunge(String * folder, ErrorCode * pError)
19891991 * pError = ErrorNone;
19901992}
19911993
1992- static int
1993- fetch_imap (mailimap * imap, bool identifier_is_uid, uint32_t identifier,
1994- struct mailimap_fetch_type * fetch_type,
1995- char ** result, size_t * result_len)
1994+ int IMAPSession::fetch_imap (mailimap * imap, bool identifier_is_uid, uint32_t identifier,
1995+ mailimap_fetch_type * fetch_type, char ** result, size_t * result_len)
19961996{
19971997 int r;
19981998 struct mailimap_msg_att * msg_att;
@@ -2051,7 +2051,12 @@ fetch_imap(mailimap * imap, bool identifier_is_uid, uint32_t identifier,
20512051 mailimap_fetch_list_free (fetch_result);
20522052
20532053 if (text == NULL ) {
2054- text_length = 0 ;
2054+ if (mOutlookServer ) {
2055+ text_length = 0 ;
2056+ }
2057+ else {
2058+ return MAILIMAP_ERROR_FETCH;
2059+ }
20552060 }
20562061
20572062 * result = text;
@@ -2717,8 +2722,7 @@ Array * IMAPSession::fetchMessagesByNumberWithExtraHeaders(String * folder, IMAP
27172722 return result;
27182723}
27192724
2720- static int fetch_rfc822 (mailimap * session, bool identifier_is_uid,
2721- uint32_t identifier, char ** result, size_t * result_len)
2725+ int IMAPSession::fetch_rfc822 (mailimap * session, bool identifier_is_uid, uint32_t identifier, char ** result, size_t * result_len)
27222726{
27232727 struct mailimap_section * section;
27242728 struct mailimap_fetch_att * fetch_att;
0 commit comments