inconsistent in Redemption
Hi,
I am trying to get the smtp address of the email item in outlook
offline(machine does not have outlook session). This is the my code.
But sometimes its giving the smtp address and sometimes it gives empty
stirng
Dim UtilObject As Redemption.MAPIUtils
Dim MessageItem As MessageItem
Dim ToAddress As SafeRecipient
Const PR_EMAIL = &H39FE001E
Set UtilObject = CreateObject("Redemption.MAPIUtils")
Set MessageItem = UtilObject.GetItemFromMsgFile("D:/test1.msg")
For Each ToAddress In MessageItem.Recipients
Debug.Print ToAddress.Address ' To get the smpt email id
If InStr(ToAddress.Address, "@") = 0 Then
Debug.Print ToAddress.Fields(PR_EMAIL) ' To get the smpt
email id
end if
Next
here ToAddress.Fields(PR_EMAIL) function sometiem gives proper smtp
address. but sometimes it gives empty string..
Any help really appreciated..
Thanks
Vadivel
|