I am trialing the aspose.total and have almost finished. The last thing that I can’t figure out is getting the TO address’s from an existing msg within a PST.
I am using the following code to retrieve the bcc and cc. Maybe I am missing something? I’ve tried message.DisplayTo but that is just the name and not the email address.
The eml_to var ends up always being the DisplayName.
For Each rec In message.Recipients
'1(or else) = TO 2 = CC 3 = BCC
Select Case rec.RecipientType
If eml_cc = “” Then
eml_cc = rec.EmailAddress
eml_cc = eml_cc & “;” & rec.EmailAddress
If eml_bcc = “” Then
eml_bcc = rec.EmailAddress
eml_bcc = eml_bcc & “;” & rec.EmailAddress
If eml_to = “” Then
eml_to = rec.EmailAddress
eml_to = eml_to & “;” & rec.EmailAddress
EDIT: I think the recepient.EmailAddress returns a display name if it was the owner of the PST file. Is this normal?
I have identified the issue. If the email was sent “on behalf of” another user, I can’t get the sent address.