Hi all,
I am creating a plugin that sends an email whenever a document is saved and a tv is set to yes. First I created a snippet that did this because it is earlier debugging. Next I copied the snippet code into a plugin and tagged the ondocformsave event. However, the plugin is not executed. So I tried sending a simple email with the plugin by using php mailer, but it doesn’t work. When I put the code in a snippet, it does work.
The only difference between the snippet and the plugin is that the snippet contains a line
$id = $modx->documentIdentifier
I have another plugin thats working on the ondocformsave event that is working fine. In the event order the mail plugin I am creating should happen before the other plugin.
Does anyone have an idea why the plugin is not doing anything?
Thanks in advance,