0

My web app is a ticketing system(like Zendesk) and it needs to read emails from an email account and create Tickets from the emails instantly.

Probably less important info here: We also need to identify followup emails to be added as comments(We are planning to make use of email subject(regular expressions) here.

Requirement: An Email server or any third party integration which notifies my web app about new emails received in an email account.

If it is an email server it need to work on Windows OS. We would really like free or open source software but we are open to paid ones if free ones do not have the feature

What I already did: I see that this can be done using IMAP - IDLE. I am not sure how to implement this and I didn't see any email servers capable of making webhook calls.

0

All right, I got this working. Here is the summary:

Every email server stores each email as files somewhere in the filesystem. I created an event listener on file creation on this folder to trigger a script in the server which uses IMAP to connect to the email server in the same server to read the new email.

Details:

I was using Coldfusion for my webapp and its application server provides the above event built-in. So it was super easy to trigger the script when a new file is created.

As a general case the OS will provide such triggers(file creation on a folder), say Scheduled Tasks for Windows. Using it we can trigger a script in our server and do whatever we need when a new file is created. In the case of the webapp you might probably want to use command line triggering of the scripts

Third party solution: You can use Zapier for forwarding your emails to a custom email of theirs(which we get to create while we create an account with them) and we can make Zapier post the contents of the email to an URL in our webapp instantly.

0

With postfix and dovecot you can trigger events to happen when a specific user/address receives a message. Ie, ticketuser@tickets.example.com gets a message, it is read by a script and inserted via API calls to your ticketing system.

You can also use the address delimiter to set things up so that ticketuser-ticketnumber@tickets.example.com delivers all messages to ticketuser@tickets.example.com

See https://serverfault.com/questions/660877/postfix-dovecot-run-script-when-mail-is-received

https://unix.stackexchange.com/questions/178396/run-script-on-receipt-of-email

https://www.howtoforge.com/community/threads/postfix-auto-run-script-when-mail-received.47407/

For multiple ways of doing all of this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.