Avatar of livewirewebsolutions
 asked on

Cron Job code - delete emails off server when they are received - cpanel

I am with hostgator and have a cpanel on my account with the ability to add cron jobs.  I currently have all emails on the cpanel forwarded to my internet hosting email.  I want to have the emails deleted off the web server when I receive them on my email system at home.  Does anyone have a cron job code for this?
PHPEmail ServersApache Web Server

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

I was looking for something more simple than that.
Ray Paseur

The inMotion example looks about as simple as it can get.  It seems like it would be easy to change "archive" to "delete" with only a few lines of code.

What has HostGator said when you asked them about this question?  Surely you are not the first HostGator client who was interested in automatic cleanup!

They just said you could write a cron job.  That's it.  When I went to the cpanel and clicked on Cron jobs there was a bunch of fields with dates and times etc... and one field to input the code.

I thought I could just complete the fields and enter a simple line of code and I would be done.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes