PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins Outlook extraction question.

Reply

Outlook extraction question.

 
Thread Tools Rate Thread
Old 03-04-2006, 07:14 PM   #1
Tom Andrecht
Guest
 
Posts: n/a
Default Outlook extraction question.


I have a DLL I'm working on creating in Delphi that will let me extract
information out from calendar, contact, and email items, and for the most
part it works great. I'm working through an Exchange server, and I know a
lot of my clients also use Outlook with Exchang servers. Right now, I can
extract everything, but when I get the email address (Email1Address), it
returns the Exchange format(/0.../ou.../cn...) for any and all exchange
addresses, however, when I look at the address, I see it as SMTP format
(user@domain). Does anyone know How do I can get the exchange format
translated to SMTP? Outlook is great at translating it itself, but they're
not real forthcoming on how I can get it moved over to a usable SMTP format
for my program. Thanks for the help.


  Reply With Quote
Old 03-04-2006, 10:13 PM   #2
Dmitry Streblechenko
Guest
 
Posts: n/a
Default Re: Outlook extraction question.

You will need to use Extended MAPI/CDO 1.21/Redemption to read the
PR_SMTP_ADDRESS (not available in the cached mode) or
PR_EMS_AB_PROXY_ADDRESSES property.

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

"Tom Andrecht" <tom.andrecht@dmacorporation.com> wrote in message
news:%23LBr4p0VGHA.4720@TK2MSFTNGP15.phx.gbl...
>I have a DLL I'm working on creating in Delphi that will let me extract
>information out from calendar, contact, and email items, and for the most
>part it works great. I'm working through an Exchange server, and I know a
>lot of my clients also use Outlook with Exchang servers. Right now, I can
>extract everything, but when I get the email address (Email1Address), it
>returns the Exchange format(/0.../ou.../cn...) for any and all exchange
>addresses, however, when I look at the address, I see it as SMTP format
>(user@domain). Does anyone know How do I can get the exchange format
>translated to SMTP? Outlook is great at translating it itself, but they're
>not real forthcoming on how I can get it moved over to a usable SMTP format
>for my program. Thanks for the help.
>



  Reply With Quote
Old 03-04-2006, 11:30 PM   #3
Tom Andrecht
Guest
 
Posts: n/a
Default Re: Outlook extraction question.

Ok, I think it's going to have to be Extended MAPI since some information I
found on the web says CDO isn't always installed with Outlook and the budget
doesn't allow the purchase of Redemption at this time. My next problem is,
I don't understand MAPI enough to know how to get at this stuff. I have
your MAPIServices file, but after looking through it, i'm not sure exactly
which pieces I need to create, or if I even have what I need. If I'm
thinking about this right, I need to create an IMapiSession, a
TMapiConnection, and item classes for the items i'm working with. Am I
thinking along the right lines? or would it be easier to use the
GetMapiStringProperty (or one of the other property access functions
included)? Unfortunately, I've been thrown into the middle of a project
someone else started, and I don't know enough about this technology yet to
be able to tell much about it, and the resources I've found have been great
for concept, but quite limited on implementation. Thanks for your help.

Tom


"Dmitry Streblechenko" <dmitry@dimastr.com> wrote in message
news:e3JffM2VGHA.1204@TK2MSFTNGP12.phx.gbl...
> You will need to use Extended MAPI/CDO 1.21/Redemption to read the
> PR_SMTP_ADDRESS (not available in the cached mode) or
> PR_EMS_AB_PROXY_ADDRESSES property.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Tom Andrecht" <tom.andrecht@dmacorporation.com> wrote in message
> news:%23LBr4p0VGHA.4720@TK2MSFTNGP15.phx.gbl...
>>I have a DLL I'm working on creating in Delphi that will let me extract
>>information out from calendar, contact, and email items, and for the most
>>part it works great. I'm working through an Exchange server, and I know a
>>lot of my clients also use Outlook with Exchang servers. Right now, I can
>>extract everything, but when I get the email address (Email1Address), it
>>returns the Exchange format(/0.../ou.../cn...) for any and all exchange
>>addresses, however, when I look at the address, I see it as SMTP format
>>(user@domain). Does anyone know How do I can get the exchange format
>>translated to SMTP? Outlook is great at translating it itself, but
>>they're not real forthcoming on how I can get it moved over to a usable
>>SMTP format for my program. Thanks for the help.
>>

>
>



  Reply With Quote
Old 04-04-2006, 12:42 AM   #4
Dmitry Streblechenko
Guest
 
Posts: n/a
Default Re: Outlook extraction question.

I am not sure what GetMapiStringProperty function you mean, you are probably
mistaking me for somebody else :-)
In general, you don't need a new session as AddressEntry object in OOM
exposes a MAPIOBJECT property (evaluates to IAddrEntry object in MAPI).
1. Cast AddressEntry.MAPIOBJECT to MAPIdefs.IAddrEntry
2. Use HrGetOneProp to retrieve PR_SMTP_ADDRESS or
PR_EMS_AB_PROXY_ADDRESSES property
3. Read TSPropValue.Value.lpszA (in case of PR_SMTP_ADDRESS ) or
TSPropValue.Value.MVszA (in case of PR_EMS_AB_PROXY_ADDRESSES)
4. Call MAPIFreeBuffer to free teh memory (PSPropValue) returned by
HrGetOneProp.

If your code runs outaside of the outlook.exe address space (i.e. it is not
ta COM addin), you will need to wrap the sequence above into
MAPIInitialize/MAPIUninitialize.

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

"Tom Andrecht" <tom.andrecht@dmacorporation.com> wrote in message
news:OpeZL52VGHA.1764@TK2MSFTNGP11.phx.gbl...
> Ok, I think it's going to have to be Extended MAPI since some information
> I found on the web says CDO isn't always installed with Outlook and the
> budget doesn't allow the purchase of Redemption at this time. My next
> problem is, I don't understand MAPI enough to know how to get at this
> stuff. I have your MAPIServices file, but after looking through it, i'm
> not sure exactly which pieces I need to create, or if I even have what I
> need. If I'm thinking about this right, I need to create an IMapiSession,
> a TMapiConnection, and item classes for the items i'm working with. Am I
> thinking along the right lines? or would it be easier to use the
> GetMapiStringProperty (or one of the other property access functions
> included)? Unfortunately, I've been thrown into the middle of a project
> someone else started, and I don't know enough about this technology yet to
> be able to tell much about it, and the resources I've found have been
> great for concept, but quite limited on implementation. Thanks for your
> help.
>
> Tom
>
>
> "Dmitry Streblechenko" <dmitry@dimastr.com> wrote in message
> news:e3JffM2VGHA.1204@TK2MSFTNGP12.phx.gbl...
>> You will need to use Extended MAPI/CDO 1.21/Redemption to read the
>> PR_SMTP_ADDRESS (not available in the cached mode) or
>> PR_EMS_AB_PROXY_ADDRESSES property.
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Tom Andrecht" <tom.andrecht@dmacorporation.com> wrote in message
>> news:%23LBr4p0VGHA.4720@TK2MSFTNGP15.phx.gbl...
>>>I have a DLL I'm working on creating in Delphi that will let me extract
>>>information out from calendar, contact, and email items, and for the most
>>>part it works great. I'm working through an Exchange server, and I know
>>>a lot of my clients also use Outlook with Exchang servers. Right now, I
>>>can extract everything, but when I get the email address (Email1Address),
>>>it returns the Exchange format(/0.../ou.../cn...) for any and all
>>>exchange addresses, however, when I look at the address, I see it as SMTP
>>>format (user@domain). Does anyone know How do I can get the exchange
>>>format translated to SMTP? Outlook is great at translating it itself,
>>>but they're not real forthcoming on how I can get it moved over to a
>>>usable SMTP format for my program. Thanks for the help.
>>>

>>
>>

>
>



  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