2010-07-21 4 views
2

현재 열려있는 메일 항목의 디지털 서명을 저장하려고합니다.받은 메일의 디지털 서명을 저장하는 방법

이제 Outlook에서 프로그래밍 방식으로 새 전자 메일을 암호화/서명하는 액세스가 차단된다는 것을 알고 있습니다. 여기 나는받은 메시지에 중점을 둡니다.

지금까지는 MessageClass 속성을 사용하여 서명 된 이메일을 감지 할 수있었습니다.

Function GetCurrentItem() As Object 
    Dim objApp As Outlook.Application 

    Set objApp = CreateObject("Outlook.Application") 
    On Error Resume Next 
    Select Case TypeName(objApp.ActiveWindow) 
     Case "Explorer" 
      Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1) 
     Case "Inspector" 
      Set GetCurrentItem = objApp.ActiveInspector.CurrentItem 
     Case Else 
      ' anything else will result in an error, which is 
      ' why we have the error handler above 
    End Select 

    Set objApp = Nothing 
End Function 

Sub DoExport() 
    Set CurrentItem = GetCurrentItem() 
    If CurrentItem.MessageClass = "IPM.Note.SMIME.MultipartSigned" Then 
     MsgBox CurrentItem.MessageClass 
    End If 
End Sub 

답변

0

메시징 클래스는 암호화되고 서명 된 메일에서도 항상 "IPM.Note"인 것처럼 보입니다.
이 코드를 사용하여 메일 서명자를 읽습니다.
Set PropertyAccessor = mailitem.PropertyAccessor
If PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/id/{00020328-0000-0000-C000-000000000046}/9104001f") <> "" Then
END
End If