PDA

View Full Version : How to auto-delete sent email (specified email) from the sent items folder?



Ugur
12-12-2009, 04:40 PM
Hi,

There're rules to auto-delete emails when you receive email from someone you chose. But unfortunately, there's no such rule to auto-delete sent mail within sent items folder.

Example:

Lets say, I sent an email to example@example.com. Now, I want to delete this email from sent items folder automatically after sending is complete.

How to do this?

Thanks beforehand.

JP2112
12-14-2009, 09:23 AM
If you wanted to use VBA, you could set the MailItem.DeleteAfterSubmit Property to True. Use the Application_ItemSend Event for that.

But I have to ask, why would you want to delete Sent Items? What if you need to read what you wrote? What if the recipient never receives the email?

Ugur
12-14-2009, 09:36 AM
I dont know how to set them to true. The reason to do this is way too different in my case. It's gonna be set on another PC to do these steps:

If
mail has an attachment
then
forward it to another email,
delete all conversation ( this rule deletes item from Deleted Items folder )

In the last step, it should also delete it from Sent Items folder too. However, "thanks to Microsoft", there's no way to do that using rules.

Now I want to do last step using VBA or something else.

JP2112
12-15-2009, 01:46 PM
Google is your friend.

A quick search on "DeleteAfterSubmit Property" turned up several useful hits, along with sample code.

As an alternative, you could also set the Sent Items folder to your Deleted Items folder. That would serve the purpose of "deleting" a sent message. See the following for sample code

To set the storage folder for an outgoing Outlook message (http://www.outlookcode.com/article.aspx?id=48)

Delete Expired Items (http://www.codeforexcelandoutlook.com/outlook-vba/delete-expired-items/) (to empty the Deleted Items folder)

Ugur
12-19-2009, 03:49 PM
Still couldn't find the exact solution even tried to look for deleteaftersubmit prop.

geekgirlau
12-22-2009, 09:38 PM
Couldn't you just remove the option "Save copies of messages in Sent Items folder"?