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
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