Access the contact role in email template


When an opportunity changes stage, I send an email to the contacts linked to this opportunity (workflow). I need to put in this email all the contacts names and roles. How can I access this information from the email template module ?

I only found how to access to one contact (don’t why this one, as there is a many-to-many relationship between opportunity and contact).


Workflows are only able to do simple things, and traversing many-to-many relationships with a loop isn’t that simple, if you think of it. One person wants it done one way, the other person wants it done in another, so you get a gigantic UI which nobody understands.

I’d say your requirement is much better served with a logic hook, there you can use the full power of PHP to customize.