【问题标题】:Getting exception in reading mails from Gmail IMAP server using Lumisoft使用 Lumisoft 从 Gmail IMAP 服务器读取邮件时出现异常
【发布时间】:2012-10-20 06:24:00
【问题描述】:

我开发了从 Gmail IMAP 服务器读取邮件的网络应用程序,为此我使用了 Lumisoft.Net。

使用我的帐户一切正常,但使用我客户的帐户却抛出此错误:

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
                                );
}

因此,我遇到了很大的麻烦,所以请任何人都可以帮助我,那真的很棒。请帮帮我。

谢谢, 安维什

【问题讨论】:

    标签: asp.net imap gmail-imap lumisoft


    【解决方案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
    );
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-03
      • 1970-01-01
      • 1970-01-01
      • 2020-12-05
      • 1970-01-01
      • 2014-12-18
      相关资源
      最近更新 更多