Outlook 2007 - Automatically Deleting emails older than 6 HOURS

Hello everyone,

I have researched heavily and cannot find information on this subject. 

I get upwards of 2000 emails per hour, and would like for outlook to automatically delete them after 6 hours. 

I know with auto archive I can do this each day, but I would like to delete them in hours, not days.

Could anyone inform me of a way to do this? 

Thank you 

Alyssa

July 9th, 2015 12:19pm

Hello,

You can not delete emails in hourly basis because there is no such kind of  function in Archiving.

You can see this link for more help : http://www.slipstick.com/developer/macro-move-aged-mail/

Thanks & Regards

Clark Kent

Free Windows Admin Tool Kit Click here and download it now
July 10th, 2015 1:34am

Hi,

there are some options like macros or scrips that will use EWS/powershell (if you have Exchange server and required permissions).

Nevertheless: I would recommend to focus to the root cause. This amount of messages is usually caused by incorrectly configured notifications or logging. If you will decrease amount of incoming email, you will make your messaging admin and Exchange/other email server happier

July 10th, 2015 1:57am

I understand that no function exists in archiving, but there surely are other methods.

-- 

Could you please provide examples or a link to a tutorial or idea of such a script or method?

That amount of messages is not a misconfiguration. It is exactly correct. It is logs of a large network, we need to receive every email. The emails are watched during the day time and removed accordingly, but at night when nobody can view them, it just piles up and causes hardship on the computer.

Sorry for edit and delete, I meant to post it down here and ended up replying to the original post. 

Free Windows Admin Tool Kit Click here and download it now
July 10th, 2015 7:36am

Hi,

if you really need it and if you have administrator permissions on your exchange server, you could schedule a script, that will use  search-mailbox cmdlet to locate mails you want to remove (searchquery parameter) and to delete them (deletecontent parameter):

https://technet.microsoft.com/EN-US/library/9ee3b02c-d343-4816-a583-a90b1fad4b26(EXCHG.150).aspx

July 10th, 2015 8:01am

I apologize for my late reply. I work at several places, and have been extremely busy. 

I have been attempting to work on a script to do this through VB or Powershell. We do not have an exchange server according to the email administrator. With no prior knowledge of VB, I am having great difficulty creating a script. I've managed to make a script to delete all the emails in a folder, but I was unable to figure out how to "swap" the folder or how to loop it over every six hours.

I will continue on this, as I work the entire weekend and will attempt to finish this script. If anyone has any knowledge of this and may assist me with information or tutorials, I would greatly appreciate it. Once I finish this script or give up, I will mark this as answered.

Thank you for your help. 

Free Windows Admin Tool Kit Click here and download it now
July 14th, 2015 5:50pm

Even if I still believe, that making such script will be ineffective and there should be made steps to decrease amount of incoming emails, I found a script that might help you:

https://gallery.technet.microsoft.com/office/Vbscript-for-Outlook-ec13f44a

during cleanup DateAdd function is used

IF colitems(i).ReceivedTime < Dateadd("d",-daysold,Now)

and as you can see here https://msdn.microsoft.com/en-us/library/hcxe65wz(v=vs.90).aspx, dateadd can be used also for hours

Hope it helps.

July 16th, 2015 8:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics