NET使用MAPI下载或阅读电子邮件附件

NET使用MAPI下载或阅读电子邮件附件

本文介绍了VB.NET使用MAPI下载或阅读电子邮件附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用MAPI从Eudora(与Outlook相同)中读取邮件的代码

I have a code for reading mails from Eudora(same as Outlook) using MAPI

If MAPIsess.SessionID = 0 Then MAPIsess.SignOn()
With MAPImsg
    .SessionID = MAPIsess.SessionID
    .Fetch()
    For i As Integer = 0 To .MsgCount - 1
        .MsgIndex = i
        If .AttachmentCount > 0 And .MsgRead = False Then
            Console.WriteLine("Attachment to Download or Read: " & .MsgIndex & " >> " & .MsgDateReceived & " >> " & .MsgSubject & " >> " & .AttachmentCount)
            If .AttachmentCount > 0 Then
                If .AttachmentPathName <> "" Then
                    Console.WriteLine(.MsgIndex & " >> " & .AttachmentName & " >> " & .AttachmentPathName)
                End If
            End If
    Next
    MsgBox("End")
End With



我还可以获得附件名称,我的问题是我想下载或阅读(excel,文本,单词和其他)附件.



I can also get the attachment name, my problem is I want to download or read(excel, text, word and others) the attachment.

推荐答案


这篇关于VB.NET使用MAPI下载或阅读电子邮件附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 14:54