We have an app that allows users to select different literature that they want to be sent to them. We wanted to create and email that included only the options that the user selected.
We did something similar to what Kristen did, and it's working very well. Instead of using a snippet, we created a token that was local to the program. Within that token we used what's called "email scripts" and customized our code there. Then we included the token within our email.
Here is our example:
#if (${lead.request.contains("Product Portfolio")})
<table cellpadding="0" border="0" width="100%" ><tr><td valign="middle" style="vertical-align:middle" width="201"><img border="0" style="vertical-align:middle" valign="middle" width="201" src="IMAGE LINK”/>
</td><td valign="middle"><p style="color: #000000; font-size: 18px; line-height: 19px; font-family: Arial,Helvetica,sans-serif; margin-top: 0px; margin-bottom: 12px; font-weight: normal;"><span style="font-size: 18px;"><a href="DOCUMENT LINK "> Product Portfolio </a></span></p></td></tr></table>
#end
#if (${lead.request.contains("Software")})
<table cellpadding="0" border="0" width="100%" ><tr><td valign="middle" style="vertical-align:middle" width="201"><img border="0" style="vertical-align:middle" valign="middle" width="201" src="IMAGE LINK" />
</td><td valign="middle"><p style="color: #000000; font-size: 18px; line-height: 19px; font-family: Arial,Helvetica,sans-serif; margin-top: 0px; margin-bottom: 12px; font-weight: normal;"><span style="font-size: 18px;"><a href="DOCUMENT LINK">Software </a></span></p></td></tr></table>
#endEtc.....
You can find the information on the email scripts here:
https://community.marketo.com/MarketoArticle?id=kA050000000LB9MCAW This was actually much simpiler than it appears, but I think it depends on the logic behind the code. We basically used the "if/then" logic, so it was relatively simple.