Hi there - thanks for posting here and for sharing your work!
As I mentioned in CONTRIB-8635 your first step would be to turn this code into a stand-alone Moodle plugin - you should all go through our free Moodle plugin development course here to show you how to do this:
https://moodle.com/news/learn-moodle-plugin-development/
Also as mentioned, please make sure you take a close look at our Security guildelines and the correct way to access the Moodle database using the API's.
Also - Moodle already has the capability to deal with email replies to forum posts as per:
https://docs.moodle.org/en/Mail_configuration#Incoming_mail_configuration
https://docs.moodle.org/en/Using_Forum#Reply_to_posts_via_email
I'm not sure how your work differs from this standard feature but it would be interesting to hear more detail about what your plugin does here!
thanks,
As I mentioned in CONTRIB-8635 your first step would be to turn this code into a stand-alone Moodle plugin - you should all go through our free Moodle plugin development course here to show you how to do this:
https://moodle.com/news/learn-moodle-plugin-development/
Also as mentioned, please make sure you take a close look at our Security guildelines and the correct way to access the Moodle database using the API's.
Also - Moodle already has the capability to deal with email replies to forum posts as per:
https://docs.moodle.org/en/Mail_configuration#Incoming_mail_configuration
https://docs.moodle.org/en/Using_Forum#Reply_to_posts_via_email
I'm not sure how your work differs from this standard feature but it would be interesting to hear more detail about what your plugin does here!
thanks,