Jump to content

Recommended Posts

Is it possible to have a CRON job (or other resource) that automatically deletes emails in all mailboxes on an account automatically according to a date?

 

For example: On the first of the month go through all email boxes and delete all emails that are more than 2 weeks old?

 

Any ideas or thoughts welcome.

Share this post


Link to post
Share on other sites

The short answer is yes.

 

The longer answer is it would take some thought to make sure you aren't deleting files you shouldn't be, but it can be done.

 

Do you want to only delete emails in the INBOX? Or do you want to remove emails from other IMAP folders as well?

 

Do you want to remove emails that are unread as well? Or only those that have been read?

Share this post


Link to post
Share on other sites

I would want to remove emails in all folders whether read or not. Thanx!

Share this post


Link to post
Share on other sites

Howdy ... just following up ... any feedback on how to accomplish this as in direction or help with code to create job?

Share this post


Link to post
Share on other sites

Haven't forgotten you. I just need to fully test out the concept before sharing it as I wouldn't want you accidently deleting files you want to keep. :)

 

Just been swamped with work and my daughter's 6th birthday this weekend. I'll get to it shortly.

Share this post


Link to post
Share on other sites

Thank you and no hurry ... happy birthday to your daughter, too!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...