02-20-2023, 06:22 AM
(02-19-2023, 09:30 AM)Corsari Wrote: Pipe is for creating new tickets from incoming mails (did you set it up?)
Fetch is for parsing income emails for ticket replies
From what I understand, you will use either pipe or IMAP fetch. They essentially do exactly the same thing but in different ways and are intended to give users a choice depending on their deployment environments. Some environments might be more locked down than others and therefore using pipe isn't an option and they will need to use fetch instead.
However, both pipe and fetch will create new tickets, and process replies to existing tickets (provided certain information has been retained in the replies). Because I'm in a hosted environment, I opted for IMAP fetch because it meant less messing around in Linux and getting permissions right, etc. As a result, I've never tried using pipe.
(02-19-2023, 09:30 AM)Corsari Wrote: Well, how does HelpDeskZ manages the pipe process?
I suppose a specific email address is needed eg [email protected]
then: is some specific subject needed in the incoming mail? Or more generically, any email sent to [email protected] will create a ticket?
pipe processes emails in the same way as fetch except it looks directly at the mailbox files rather than going through an interface like IMAP. So yes, it would act on a specific email address and process all emails sent to that mailbox (email address).
Have a look at parseToTicket() in MailFetcher.php. It calls getTicketFromEmail() in Tickets.php and uses preg_match() to search the subject for a string that starts with a left square bracket (\[), followed by a pound sign (#), and then one or more digits ([0-9]+). The string must end with a right square bracket (]). If it finds this, it assumes it to be a ticket ID and adds the email to the ticket's messages. If not, it creates a new ticket.
(02-19-2023, 09:30 AM)Corsari Wrote: and what about eventual SPAM? (That is why some specific string in the subject would help so much)
All SPAM will end up as a new ticket, and so will email bounces and out-of-office replies. HDZ doesn't have any way of filtering 'junk' emails.