Conversation
Adds options for auto handling of emails when processed by ticket_email_parser.php
Adds options for auto handling of emails when processed by ticket_email_parser.php
Adds options for auto handling of emails when processed by ticket_email_parser.php
Adds options for auto handling of emails when processed by ticket_email_parser.php
Adds options for auto handling of emails when processed by ticket_email_parser.php
|
If there is a clean way to include the SQL changes, please let me know how you guys prefer to handle this and i will update my PR to match. Also i should say, this has been verified with Microsoft 365, it is fully expected to work for Google, but not tested as i dont have a google environment setup to test with. |
|
Hello, thank you for the PR. I will let @johnnyq go through the details but I just wanted to mention database updates should be made via database_updates.php. |
Bumped database version to 2.4.1
Bumped database version to 2.4.1 and added migrations required to support this feature.
Thanks for that, i have made the changes in those files, appologies, i missed that! |
|
looks good, I like the move to custom folder name but the the other option should be left alone. Currently only processed files that get moved to the itflow folder get marked read, no other emails are touched unless specifically opened with an email client. |
|
Sorry, it has been a long day, but im not sure i fully understand your comment. The options i added should all work and are pretty standard in other ticket platforms. Some businesses want the emails to forever be in the inbox (why?!), some want them deleted (which is bad) and others like them marked as read and moved to a "processed" folder. What i have seen in multiple MSP companies is there is a support@company.com email address which is purely used for incoming tickets, i personally see no reason why you would want them to be left unread asnd sat in the inbox folder (to me its a sanity check that the ticket has been seen by your ticting platform of choice and has been processed), but each to their own, hence the 4 choices. Are you saying you'd like the other options removed except for Move to Custom Folder, or that you've tested them and they dont work? As you can probably tell from my 2 commits, i come from an MSP background, more on the technical side the billing and so tickets have been my life for years. IT Flow is an amazing platform combining 3 (at least) different systems into one and im trying to bring the ticketing side of it on-par with some of the market leaders out there. I know these arent requested features (well, this isnt, OAuth most certainly was) but theyre nice quality of life things. If you wanted to reach out at all and discuss your roadmap/ideas/wishes for the ticketing side of things i can possibly step in to help develop some of those, or im happy to keep submitting PR's for elements i personally feel are missing :) I dont want to post my email in a comment (for want of not being spammed by bots) but its in section 2 of the license file for another project on my repo https://github.com/cs2000/DankDroneDownloader/blob/master/LICENSE |
|
@cs2000 I am using shared mailboxes in MS365 will the new OAuth work with that? also is there any chance if you could document the OAuth process at least for MS365 in the docs at https://docs.itflow.org/email_config Thanks so much! Looking forward to! |
Already done, but here https://docs.itflow.org/ticket_email_parse as for shared mailboxes. Genuinely not sure, you need to be able to login to the mailbox to authorise OAuth, I will check if that can be done another way, but that’s not the subject of this PR. |
|
@cs2000 thats fantastic your credentials working for MSPs on both sides technical and billing fit quite well with our project and we appreciate your help. Let me clarify a bit, You mentioned four options above:
field We want to keep thing as simple and providing best defaults without providing an overwhelming number of options. @git-kup this is different topic than OAUTH2 and shared mailboxes. You may be referring to this PR that was recently merged: #1261 |
|
Thanks, understood, will work on this and resubmit. Btw, is there any appetite for “canned replies” in the ticket system? |
|
Awesome @cs2000 |
|
Also we do have quite a few requested features on the forums https://forum.itflow.org/t/features |
- Removed config_imap_processed_action column from fresh schema. - Kept config_imap_processed_folder.
-Updated migration block (2.4.0 -> 2.4.1) to add only config_imap_processed_folder. Removed config_imap_processed_action.
- Removed loading of config_imap_processed_action
- Removed all action branching (delete, none, none_unread). - Processed messages now always sets the 'Seen' flag and moves to configured folder (with existing O365 fallback/retry logic retained).
- Removed all read/validate/save handling for now deleted config_imap_processed_action. - Saves only config_imap_processed_folder (defaults to ITFlow when blank).
- Removed the action dropdown (Do Nothing..., Delete, etc.). - Kept only the folder textbox (config_imap_processed_folder, default ITFlow). - Updated helper text to state fixed behavior: marked read + moved.
|
❌ The last analysis has failed. |
|
@cs2000 super! we'll review further |
|
Hello @cs2000 |
|
No worries, it’s your code! want me to just adjust the PR so it’s always ITFlow as the folder? I will leave some helper text behind stating that emails will be moved there but remove the text box? Or are you happy to roll this in your own way? |
|
Hello. Please do take a moment to review our AI/LLM policy: https://docs.itflow.org/ai_llm_policy |
|
Hey @wrongecho i know you meant no offence by your comment, so I will explain. I first found ITFlow in December 2025, installed it in Jan 26 and have been using it daily since. I am For me, I have used LLM’s to get me a leg up in understanding your code base, learning where you prefer to do certain things etc and of course debugging when (inevitably) what you write first time round doesn’t quite work the way you want it to. The code I have submitted to you however is not AI generated. In my stable of other projects are DankDroneDownloader.com, a site written probably 5 years ago now fully in PHP/MySQL and lately Drone-Hacks.com, this is not the same at all but a much more complex project than anything I have contributed to your code. Whilst my style of writing may be different to yours, which is of course always going to be true, please don’t take my submissions as purely AI. As mentioned it was used where needed to bring me up to speed and to assist debugging, but not in code writing. As mentioned though, this is your project, I am just trying to contribute and add some missing features from a vital component of your amazing work, however if you prefer I not do that, that’s your choice and one I would of course respect. |

Adds configurable post‑processing for parsed emails
Allows the user to select one of the following options
Improves O365 handling by using UID sequence and IMAP MOVE/COPY fallback + TRYCREATE folder creation.
Migration SQL
Notes for maintainers
New settings are read via load_global_settings.php
Stored by settings_mail.php
Used by ticket_email_parser.php
Upgrade process?
As far as i can tell, ITFlow does not currently auto‑apply schema migrations at runtime. The project typically expects:
manual SQL changes, or a versioned DB migration script