2012-10-20 103 views
0

我開發了從Gmail IMAP服務器讀取郵件的Web應用程序,並且我已經使用Lumisoft.Net。使用Lumisoft從Gmail IMAP服務器讀取郵件時發生異常

與我的帳戶一切工作得很好,但與我的客戶的帳戶,它拋出這個錯誤:

System.Exception: Read length can't be bigger than source string ! 
    at LumiSoft.Net.IMAP.Client.IMAP_Client.Fetch(Boolean uid, IMAP_t_SeqSet seqSet, IMAP_t_Fetch_i[] items, EventHandler`1 callback) 
    at GetOutput.Page_Load(Object sender, EventArgs e) 

我從下面的代碼獲得此異常

if (folder.FolderName.Contains("All Mail")) 
{  
imap.SelectFolder(folder.FolderName); 
    imap.Fetch(
            false, 
            IMAP_t_SeqSet.Parse("1:*"), 
            new IMAP_t_Fetch_i[]{ 
            new IMAP_t_Fetch_i_Envelope(), 
            new IMAP_t_Fetch_i_Flags(), 
            new IMAP_t_Fetch_i_InternalDate(), 
            new IMAP_t_Fetch_i_Rfc822Size(), 
            new IMAP_t_Fetch_i_Uid() 
           }, 
            this.m_pImap_Fetch_MessageItems_UntaggedResponseInbox 
           ); 
} 

我由於大麻煩對此,請任何人都可以幫助我,那將會非常棒。請幫幫我。

感謝, Anvesh

回答

1
m_pImap.SelectFolder(folder); 
//m_pImap.Search(false, "UTF-8", "UNSEEN"); 

// Start fetching. 
m_pImap.Fetch(
    false, 
    IMAP_t_SeqSet.Parse("1:*"), 
    new IMAP_t_Fetch_i[]{ 
     //new IMAP_Search_Key_Unseen(), 
     new IMAP_t_Fetch_i_Envelope(), 
     new IMAP_t_Fetch_i_Flags(), 
     new IMAP_t_Fetch_i_InternalDate(), 
     new IMAP_t_Fetch_i_Rfc822Size(), 
     new IMAP_t_Fetch_i_Uid() 
    }, 

    this.m_pImap_Fetch_MessageItems_UntaggedResponse 
); 
相關問題