PropertyAccessor.GetProperty

  • Thread starter Thread starter Peter Marchert
  • Start date Start date
P

Peter Marchert

Hello,

to read some properties you can use the "GetProperty"-Method, for
example "strHeader =
objMailItem.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x007D001E")"

Hmm, now I consider what happens
1. if the user have no connection to the internet and/or
2. if he monitors the internet traffic and see that programs get
information form it? Perhaps he think there is mailware or something
else on his computer?

Can somebody explain to me how this method works?

Best Regards
Peter
 
Internet headers are part of an email, so no traffic over the Internet is
required to read the headers. Of course emails sent internally using
Exchange won't have that property, which is also
PR_TRANSPORT_MESSAGE_HEADERS.

PropertyAccessor is essentially the equivalent of using the Fields
collection of an item in CDO 1.21 or Redemption, and is the same as you
would do using Extended MAPI.

A significant limitation exists for PropertyAccessor with named properties
(those over 0x80000000), you can only read back PT_STRING8 or PT_BINARY
properties that are <= 4088 bytes. Properties that are larger than that will
return a MAPI out of memory error (MAPI_E_NOT_ENOUGH_MEMORY). That is
because MS did not implement a fallback to reading the property as an
IStream.

This limit is store provider dependent and can be larger than 4088 bytes
(I've been able to read 8K in some cases), but I would not depend on it if
the property value is larger than 4088. For MV properties the limit is per
array item, BTW.

The same lack of streaming also applies to using the new table objects too.
 
Hello Ken,

thanks for this interesting informations.

The reading of the header was an example - I don`t read the header of an
email in my actual project :-)

I´m interessted how this method work. Does it gets informations from the
internet? It seem`s to me because the "http://...".

Thanks,
Peter

Ken Slovak - said:
Internet headers are part of an email, so no traffic over the Internet is
required to read the headers. Of course emails sent internally using
Exchange won't have that property, which is also
PR_TRANSPORT_MESSAGE_HEADERS.

PropertyAccessor is essentially the equivalent of using the Fields
collection of an item in CDO 1.21 or Redemption, and is the same as you
would do using Extended MAPI.

A significant limitation exists for PropertyAccessor with named properties
(those over 0x80000000), you can only read back PT_STRING8 or PT_BINARY
properties that are <= 4088 bytes. Properties that are larger than that
will return a MAPI out of memory error (MAPI_E_NOT_ENOUGH_MEMORY). That is
because MS did not implement a fallback to reading the property as an
IStream.

This limit is store provider dependent and can be larger than 4088 bytes
(I've been able to read 8K in some cases), but I would not depend on it if
the property value is larger than 4088. For MV properties the limit is per
array item, BTW.

The same lack of streaming also applies to using the new table objects
too.




Peter Marchert said:
Hello,

to read some properties you can use the "GetProperty"-Method, for
example "strHeader =
objMailItem.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x007D001E")"

Hmm, now I consider what happens
1. if the user have no connection to the internet and/or
2. if he monitors the internet traffic and see that programs get
information form it? Perhaps he think there is mailware or something
else on his computer?

Can somebody explain to me how this method works?

Best Regards
Peter

--
Peter Marchert
[EDP-Service Marchert]
Homepage: http://www.marchert.de
Programming for Excel and Outlook
 
No Internet connect is required.

You're referring to the DASL syntax for a property tag, an alternate to the
MAPI style tags we use in CDO and Extended MAPI, such as
http://schemas.microsoft.com/mapi/proptag/0x007D001E versus
PR_TRANSPORT_MESSAGE_HEADERS.

The DASL syntax will work even in offline mode.

The XSD for the DASL syntax is a link but no connection is required. It's
just one of the many namespaces that are used for Outlook and Exchange
properties, such as the /mapi/proptag one above or one such as
http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8503000B
which is ReminderSet.

The Outlook 2007 developer help has a list of the different namespaces used
for various Outlook property namespaces, just search in it for "Referencing
Properties by Namespace" it lists a bunch of namespaces that are used.
 
Ok, Ken, thank you very much.

This was really a good and important information for me.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top