Gurus: Redemption Problem with Exchange 2003

  • Thread starter Thread starter Sanjay Singh
  • Start date Start date
S

Sanjay Singh

The following code is used to get an recipient's address. It needs to work
in both online and offline mode
The code worked perfectly with Exchange 2002. However it does not work in
offline mode with Exhcange 2003.

Set oSafeMail = CreateObject("Redemption.SafeMailItem")
oSafeMail.Item = oItem
Set oSafeRec = oSafeMail.Recipients(1).AddressEntry
strType = oSafeRec.Type
If strType = "EX" Then
'RecipientEmail = oSafeRec.Fields(&H39FE001E)

Addresses = oSafeRec.Fields(&H800F101E)
For i = LBound(Addresses) To UBound(Addresses)
If Left(Addresses(i), 5) = "SMTP:" Then
RecipientEmail = Right(Addresses(i), Len(Addresses(i)) - 5)
End If
Next
ElseIf strType = "SMTP" Then
RecipientEmail = oSafeRec.Address
End If

Set oSafeMail = Nothing
Set oSafeRec = Nothing


Any help will be greatly appreciated.

Thanks
Sanjay
 
As long as your address book is available offline, PR_EMS_AB_PROXY_ADDRESSES
(&H800F101E) should be available, PR_SMTP_ADDRESS is generally not available
offline.

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