PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Recognizing signed / encrypted messages OL2003

Reply

Recognizing signed / encrypted messages OL2003

 
Thread Tools Rate Thread
Old 30-06-2005, 03:43 PM   #1
google@dcbarry.com
Guest
 
Posts: n/a
Default Recognizing signed / encrypted messages OL2003


When I group my Inbox by Message Class, I see the expected results,
message classes such as "Message", "Out of Office Reply", "Message
(StorageQuotaWarning)", "Meeting Cancellation".

I can determine almost all of these programatically, by examining
objMsg.Class and/or obj.MsgClass. However, messages of the type "SMIME
Signed Messages" return the useless .MessageClass "IPM.Note" instead
of "IPM.Note.SMIME", which is what I would expect.

This causes my code all sorts of grief, since I can't tamper with this
class of message (remove attachements and save).

I cannot use a third party add-in, nor can I expect CDO to be
available. At this point, I just need to be able to detect this kind
of message. Is this possible in a pure VBA solution?

I've seen others have had this issue too, but have not seen an usable
answer (that I could follow at least.)

I would be most appreciative of any help I can get with this.

D.

  Reply With Quote
Old 30-06-2005, 09:57 PM   #2
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
 
Posts: n/a
Default RE: Recognizing signed / encrypted messages OL2003

You'll have to use the CdoPR_MESSAGE_CLASS property with CDO to access this
message class value.

Try the sample below against an open e-mail item that's signed and note the
value of objField:

Sub GetMAPIMessageObjectFromActiveInspectorMailItem()
Dim objItem As Object
Dim objMessage As MAPI.Message
Dim objSession As New MAPI.Session
Dim objFields As MAPI.Fields, objField As MAPI.Field

If ActiveInspector Is Nothing Then Exit Sub

objSession.Logon , , , False
Set objItem = ActiveInspector.CurrentItem
Set objMessage = objSession.GetMessage(objItem.EntryID,
objItem.Parent.StoreID)
Set objFields = objMessage.Fields
Set objField = objFields.Item(CdoPR_MESSAGE_CLASS)
'objField.Value = IPM.Note.SMIME.MultipartSigned

objSession.Logoff
Set objItem = Nothing
Set objMessage = Nothing
Set objField = Nothing
Set objFields = Nothing
End Sub

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"google@dcbarry.com" wrote:

> When I group my Inbox by Message Class, I see the expected results,
> message classes such as "Message", "Out of Office Reply", "Message
> (StorageQuotaWarning)", "Meeting Cancellation".
>
> I can determine almost all of these programatically, by examining
> objMsg.Class and/or obj.MsgClass. However, messages of the type "SMIME
> Signed Messages" return the useless .MessageClass "IPM.Note" instead
> of "IPM.Note.SMIME", which is what I would expect.
>
> This causes my code all sorts of grief, since I can't tamper with this
> class of message (remove attachements and save).
>
> I cannot use a third party add-in, nor can I expect CDO to be
> available. At this point, I just need to be able to detect this kind
> of message. Is this possible in a pure VBA solution?
>
> I've seen others have had this issue too, but have not seen an usable
> answer (that I could follow at least.)
>
> I would be most appreciative of any help I can get with this.
>
> D.
>
>

  Reply With Quote
Old 30-06-2005, 10:02 PM   #3
Dmitry Streblechenko
Guest
 
Posts: n/a
Default Re: Recognizing signed / encrypted messages OL2003

I don't think there is anything you can do: Outlook always tries to be
"nice" and returns a fake unencrypted message that looks just like a normal
IPM.Note message.
Extended MAPI/CDO 1.21/third party software to be able to open the message
bypassing OOM is required.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

<google@dcbarry.com> wrote in message
news:1120142634.695029.211580@g49g2000cwa.googlegroups.com...
> When I group my Inbox by Message Class, I see the expected results,
> message classes such as "Message", "Out of Office Reply", "Message
> (StorageQuotaWarning)", "Meeting Cancellation".
>
> I can determine almost all of these programatically, by examining
> objMsg.Class and/or obj.MsgClass. However, messages of the type "SMIME
> Signed Messages" return the useless .MessageClass "IPM.Note" instead
> of "IPM.Note.SMIME", which is what I would expect.
>
> This causes my code all sorts of grief, since I can't tamper with this
> class of message (remove attachements and save).
>
> I cannot use a third party add-in, nor can I expect CDO to be
> available. At this point, I just need to be able to detect this kind
> of message. Is this possible in a pure VBA solution?
>
> I've seen others have had this issue too, but have not seen an usable
> answer (that I could follow at least.)
>
> I would be most appreciative of any help I can get with this.
>
> D.
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off