I tried increasing the timeout as you suggested but no luck. Can you let me know how you conclude it’s the mail server is slow? At times I can get 20 emails without any problem, no duplication, but only emails that were pertaining to reopened tickets or existing tickets are the ones that do not get deleted.
Please note I mentioned it DOES delete the email if the email was a new request, but if it had an existing ticket from a previous request or a reopen request, it DOES NOT delete it. And this happens from the same tasks.php instance that is executed and completed within 10 seconds. Please review the shown tasks.php output from a browser. I’ve broken it down and put in () comment’s i made on what I observed. Note the following is being tested using a completely different mail server (microsoft exchange setup with POp3 on same internal network) and same result.
(Tasks.php connects to exchange mail server, Message #1 is a new request, Message #2 is previously closed ticket in Helpspot that is replied to and reopened)
Connecting to: email@example.com >>>> Message Count: 2 >>>> Message: #1 - Time (start parse): 0.00023 >>>> Message: #1 - Time (network download): 0.00643 >>>> Message: #1 - Time (mime decode): 0.01173 >>>> Message: #1 - Time (mime loop): 0.01191 >>>> Message: #1 - RM:firstname.lastname@example.org >>>> Message: #1 - Time (header set): 0.01398 >>>> Message: #1 - Time (attachments): 0.01411 >>>> Message: #1 - Request created (15292) >>>>
(after numerous hours of debugging I noted that this is the command that is sent that actually deletes the email from the pop server) Message: #1 - Marked for deletion from mailserver >>>> Message: #1 - Time (total): 0.04592 >>>> (message #1 was deleted from server)
(message #2 is a response from customer to an existing ticket)
Message: #2 - Time (start parse): 0.00013 >>>> Message: #2 - Time (network download): 0.00653 >>>> Message: #2 - Time (mime decode): 0.01145 >>>> Message: #2 - Time (mime loop): 0.01163 >>>> Message: #2 - Ruell Medina:email@example.com >>>> Message: #2 - Time (header set): 0.01364 >>>> Message: #2 - Time (attachments): 0.01377 >>>> Expunged messages marked for deletion >> (notice this message does not have the command like in #1 that states message marked for deletion in server)
(tasks.php file completed)
Closed connection to: firstname.lastname@example.org
This process took less than 5 seconds to execute completely, and when I checked the helpspot both emails were in the system, but Message #2 was not deleted from the Pop server. Please consider my input that it has something to do with the fact the message marked for deletion command on tasks.php for some reason is not being executed when the ticket had a previous entry either opened or closed. This explains why we used to get multiple emails of the same response because each time tasks.php runs it is not deleting them from the server, and has nothing to do with being a slow email server.
If we could get over this issue I think the system will work perfectly!