Redemption: No Recipient readable in the Item_Send Event

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
 
K

Ken Slovak - [MVP - Outlook]

Save the item in the ItemSend() event handler, all the properties and the
Recipients and Attachments collections will then be available.
 
R

Ronaldk6

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

Ken Slovak - [MVP - Outlook]

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

Ronaldk6

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

Ken Slovak - [MVP - Outlook]

I mistyped. Call Save() on the item in the Item.Send() event handler. That
will not fire the security.
 
R

Ronaldk6

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top