I have a web application that sends me many emails that are only for notification purposes - and so, are not important. There can be a great deal of these per day, and I sometimes forget to delete them.

I am using a Microsoft Exchange mail server, and do not have administrator rights to it.
Is there a way I can set up/configure from Outlook a procedure that deletes emails from a specific sender after an amount of time?

  • Using the Rules Wizard you should be able to have this happen. – Ramhound Feb 11 '13 at 15:54
up vote 14 down vote accepted

I accomplished this by creating a new rule that automatically moved all emails from a specific sender into a folder.

This folder then had AutoArchive (Right click folder, Properties) set up to permanently delete items older than x days.

Using the outlook scheduler you can add a task to delete all emails from folders older than a certain amount of time. Also in the same rule you can empty the trash of all items older than a certain amount of time. Automate when it runs and you have solved your problem. On my mac the scheduler lives under the tools menu.

enter image description here

  • 5
    I'm not familiar with Outlook Scheduler; is it a plug-in? Or is Scheduler a Mac OS product which happens to be capable of managing Outlook files? – user49214 Sep 8 '15 at 18:48
  • This is not available in Outlook anymore (or perhaps never was for Windows?) – ashleedawg Aug 25 at 13:04

Posting this answer here since on another post answered it was tagged as a duplicate of this post. The below answer has more detail than the equivalent answer here so someone may find this helpful with the need.

Create a rule to delete mail after a number of days

You can combine a Rules Wizard rule with the AutoArchive feature of Microsoft Outlook to automatically delete messages as they age. There are two ways you can do this:

  1. Create a rule that moves messages meeting certain criteria to a folder. Configure the folder's Archive setting to delete messages.
  2. Setting an expire date on messages as they arrive.

In either case, AutoArchive will delete the messages for you once they age.

If you need help configuring autoarchive settings, watch the tutorial: Configuring AutoArchive settings in Microsoft Outlook.

Move messages to a new folder

  1. Create a rule that moves messages to a folder.
  2. Switch to this folder, then right click on the folder and choose Properties.
  3. On the AutoArchive tab, choose how often to clean out items and whether they should be archived or deleted.

enter image description here

Set an expiration date on the messages

Follow these steps to create a run a script rule to add an expire date and then configure AutoArchive to delete the messages.

When a message is expired it's displayed in the message list in a gray strikethrough font.

Check macro security settings. Macro security should be set to Low during testing. Once you verify the macro works, you can use SelfCert to sign the macro, at which point you will change the security setting to allow signed macros only.

In Outlook 2010 and 2013, click File, Options, Trust Center. Click the Trust Center Settings button then Macro Security. Select the bottom option for Low security. In Outlook 2007, look on the Tools menu for Trust Center, then Macro Security. In older versions of Outlook, go to Tools, Macros, Macro Security.

  1. Press Alt+F11 to open the VBA Editor.
  2. Right click on Project1 and choose Insert > Module
  3. Add the macro below to the new module.
  4. Create a rule, selecting Run a Script as the action. If you set all of the conditions in the rule, you can delete the If...Then and End If lines.
  5. Create a filter for your view that hides expired messages between AutoArchive runs.

enter image description here

  1. Configure AutoArchive to delete expired messages

enter image description here

The macro will set the message to expire in 1 day. You can use .5 to expire the message after 12 hours.

If you use conditions in the rule to filter the messages, you can remove the If...Then and End If lines from the code.

Sub SetExpire(Item As Outlook.MailItem)

If Left(LCase(Item.Subject), 7) = "weather" Then
    Item.ExpiryTime = Now + 1
    Item.Save
End If

End Sub

source

This is for Microsoft Office Outlook 2007 running on Windows 7

This is a 2 step process.

First you have to turn on the Global Auto Archive option. (assuming you are not using AutoArchive presently)

In Outlook menu Tools:Options.

Select "Other" tab.

Select "AutoArchive..." button.

Here we turn on the global Auto Archive function (so we can setup individual folder (deleted items) options.

If you do not use AutoArchive, and you only want to delete your old Deleted Items, the only check box that should be selected is: Run AutoArchive every XX days. Select this check box and put in a number less than or equal to the time you want your trash can to remove old items. For example, if you want your Deleted Items (trash can) to get rid of items that are older than 2 months, you could select "30" days in this Global AutoArchive. What is really happening is that this Global AutoArchive is going to trigger every 30 days, which will trigger the AutoArchive on the Deleted Items that we are going to setup next.

The section under "During AutoArchive:" you don't want any of those check boxes selected. These are for global settings, and will have an effect on all your email folders.

click the OK button to accept those changes (closes window), then click OK again on Options control panel.

Now we will setup the trash can AutoArchive options.

If you right click the trash can (Deleted Items) in Outlook, select Properties.

Select the AutoArchive tab.

Select radio button: Archive this folder using these settings.

There you can select how long to keep the emails in the trash (you can select the number of months weeks or days.

Then select the sub radio button: Permanently delete old items.

(other options include move old items to default archive folder, or move old items to a local directory.

I hope this was helpful

REAndy

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.