Redemption: No Recipient readable in the Item_Send Event

  • Thread starter Thread starter Ronaldk6
  • Start date Start date
R

Ronaldk6

Hello there!

I want to add some code in the Item_Send Event of an Email.
I use .NET and the Redemption.SafeMailItem Object to get Data from the mail
to be sent like this:

Private Sub m_olApp_ItemSend(ByVal Item As Object, ByRef Cancel As Boolean)
Dim sMailItem as New Redemption.SafeMailItem
sMailItem.AuthKey="MyKey"
sMailItem.Item=Item

debug.print sMailItem.Recipients.Count 'is always 0 (!!!)
'B U T:
debug.print Item.Recipients.Count
'is always 1 (so there ARE Recipients in the original Item)

End Sub


Has anybody an Idea, how i can read the Recipients from a new Mail in this
event by using the Redemption.SafeMailItem? It seems that the redemption-Item
is almost empty. No Data can be accessed. When I save it to disk, and open it
after that, an empty Mail-Item appears.

Thank you for your help, I really would need it!
Ronald
 
Save the item in the ItemSend() event handler, all the properties and the
Recipients and Attachments collections will then be available.
 
Hello Ken!

Thank's for your reply!
But I can not save the original Item in the event, because the
Security-Dialog from Outlook appears and I want to avoid that by using the
Redemption.

When I save the Redemption.object, it doesn't work. I've already tried that.
An empty saved Mailitem is the result.

Or did I misunderstand you?
Thanks again for any help!
 
The security dialogs should not appear if you save Item in ItemSave(). If
they do then something else is wrong with your code.

Is this standalone or addin code? What version of Outlook?
 
I use the Item_Send Event, not the Item_Save event.

I want to develop a tool, which gets Data from all sent Emails and changes
them before sending.

And I have Problems to read the recipient from the Mail in the Item_Send
Event, because it's simply empty when I want to read it from the Redemption
object. But there is definitely a recipient in the original Outlook-Item
Object, which is bound to the Redemption-Object.
 
I mistyped. Call Save() on the item in the Item.Send() event handler. That
will not fire the security.
 
Ah!
Thank's a lot, that works.

Greetz Ronald


Ken Slovak - said:
I mistyped. Call Save() on the item in the Item.Send() event handler. That
will not fire the security.
 
Back
Top