EmailService now has Twig render email messages in safe mode EmailService now has Twig render email messages in safe mode.
  
  -- https://craftcms.com/changelog#build2903


I don't think this is really a bug as it's intended behaviour, but this is causing me a pretty big issue because my email layout has code in it like:

{% set contactDetails = craft.globals.getSetByHandle('contactDetails') -%}

But I think safe mode now means that the craft variable isn't actually available. I can pass it in manually when I'm sending non-standard emails with craft()-&gt;emails-&gt;sendEmail(), but has anyone found a way around this for the built-in ones like the activation/verification emails?
OK so it's pretty easy to pass additional variables to the email template using the email.onBeforeSendEmail event:

craft()-&gt;on('email.onBeforeSendEmail', function(Event $event)
{
    $event-&gt;params['variables']['craft'] = new CraftVariable();
});


Although I guess there are security reasons for email templates being rendered in safe mode in the first place so I don't know how much of a good idea this is...