_:nc3d96528c0434544a52839141b7af11cxb3
<http://schema.org/text>
"I like to use a velocity macro within an guided email template. I alreay found out that it is possible to add the macro on template level within the body and that it is not possible to change (or add) the macro in the code editor of the specific email asset.\n\nIs anybody of you familar with using VTL macros in email templates?Ar there things to consider? Gos, no-goes or best practices?\n\nOr are there any restrictions that you would absolutely advise to not use macros in templates?\n\nDon’t know what you mean here. Velocimacros are fully supported in {{my.tokens}} — I have utility macros running everywhere.\n\nPerhaps what’s confusing you is macro definitions are cached until the JVM restarts, which you should interpret as “forever” when changing macro code, always creating a new #macro_v2 instead of changing #macro_v1.*\n\nAs I mentioned in your other related thread, there’s almost zero justification for putting Velocity code directly in the email body, whether it be in the email template or in an individual email asset. It carries an immense risk of regression, which I’ve seen several times. (Regressions affecting VTL in {{my.tokens}} are worry enough!)\n\n\n*since it’s not actually forever, there’s no guarantee that your macro cannot be redefined by any other Velocity code, which is why you should collaborate with people you trust"
<https://nation.marketo.com/t5/product-discussions/using-velocity-macros-in-email-templates/m-p/329689/highlight/true>