Christian
Christian

Reputation: 755

Add PHP variables to Mandrill template

I just made the switch from the PHP mail function to Mandrill, but Mandrill sees the PHP in the email as HTML and prints the variables like this:

enter image description here

Does anyone know how to add PHP to the HTML template?

Upvotes: 0

Views: 2272

Answers (2)

Urdesh Kumar
Urdesh Kumar

Reputation: 1130

Definity you can use PHP variable with template,same issue i was facing,

by using below statement,you can pass PHP code

<div mc:edit="main_content"></div>

Your code will be look like that

<div mc:edit="main_content">
  $title=$occasion

</div>

Upvotes: 0

Daniel Paul Searles
Daniel Paul Searles

Reputation: 804

Doesn't look like you can use PHP with Mandrill, but you can use placeholders for custom content. Please take a look at the section of this page titled "Create dynamic content (placeholders for custom content)"

Upvotes: 1

Related Questions