Issues with Twig template includes when rendering from a service called from a CP-triggered event
Not 100% sure what is going wrong here, but here is what I would do to debug this on my end:


Simply output the current path the template parser is using in the controller and event handler to see the difference in the values

var_dump(craft()-&gt;path-&gt;getTemplatesPath());
exit();

If the values are different, you can override the value to do your parsing as your need it like so:

// Get the current path and save it
$oldPath = craft()-&gt;path-&gt;getTemplatesPath();

// Set your desired template path
craft()-&gt;path-&gt;setTemplatesPath('your/new/path');

// Render your template and pass some data to it that will be parsed
craft()-&gt;templates-&gt;render('your/template', $data = array());

// Set the old path so Craft can resume as normal and you don't break stuff
craft()-&gt;path-&gt;setTemplatesPath($oldPath);

One other option is to try to include your macro like so:

{% import 'myplugin/_macros/mymacro' as mymacro % }



I basically do the exact same thing you are doing with Postmaster for Craft. I include my own macros, parse templates and strings during event handlers, it all works perfectly for me using the technique I outlined above. Feel free to take a look at my code if you want to see some more advanced examples of this.

On a side note, I bet Postmaster will do exactly what you want to do in regards to sending an email for new entries. You should give it a shot, it has loads of additional features I bet you could use. No less, I do help this solve your problem either way. Sorry this wasn't really an official answer or a guaranteed fix, but I gave it my best shot without seeing all of your code.