Reputation: 633
I'm having some trouble making a plugin that will send an email using the users settings without having the item go to Sent Items. I thought I could simply grab the EntryId before sending it and then dlete it from the sent items and deleted folder restricted by that entryID but the problem is that after using mailItem.Send the mail gets sent to the outbox.
I tried looping and rechecking the sent items folder but the email doesn't seem to leave the outbox while this looping is going on.
Does anyone have any suggestions for getting around this?
Upvotes: 0
Views: 455
Reputation: 66235
All you need to do is set the MailItem.DeleteAfterSubmit property to true.
Upvotes: 3