HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Tasks.php don't want to delete emails


#1

Hi,

Is there a way to prevent tasks.php from deleting emails?


#2

No, it will always delete them. However, if you want a backup the easiest thing to do is setup a mail rule on your mail server (not in HS) to forward email as it comes in to a backup account.


#3

That’s too bad. Thanks for the reply.


#4

It needs to delete them because it’s too easy for them to end up back as unread and be duplicated and so on.


#5

Looking at the database, I see you store the last imported message id. Each email also has a unique ID associated with it. It is conceivable that you could change the behaviour of tasks.php to only check ( unread email || email with a UID > the last retrieved email).

I’m not intending to presume you should implement my changes, or that you don’t know what you’re doing. Nor am I suggesting I know everything about the possible problems tasks.php encounters. I’m simply a programmer too, so when I see a problem, I try to find a solution :wink:

Thanks.


#6

Thanks Dylan :slight_smile:

We tried not deleting them when we first had HS in beta 4 years ago and it was a disaster. Technically keeping them on the server isn’t a problem, but people end up accessing the emails manually and changing their read status. They also end up answering them directly and routing around HS and thereby loosing the data they’re trying to track with HS.

Forwarding the emails works great for backup which is most peoples main concern. There are some cases where it probably would be good to allow this, but it’s so tricky in other ways that it just doesn’t prove to be worthwhile. It is something we review from time to time though and we’ll continue to do so.