WPMandrill template not changing the {{variable}} data
-
Hello,
I’m using the wpmandrill plugin for wordpress to send emails using a template that is on mandrill.I’m using the following code:
wpMandrill::mail($to, $subject, $html, $headers = ”, $attachments = array(), $tags = array(), $from_name = ‘cursos edu2’, $from_email = ‘info@mail.com’, $template_name = ‘bienvenida-dibujo’, $merge_vars = array( array(
‘rcpt’ => $to,
‘vars’ => array(
array( ‘name’ => ‘nombre’, ‘content’ => ‘pepito perez’ ),
array( ‘name’ => ‘lastname”, ‘content’ => $lastname ),
)
))
);and in mandrill theme am using {{nombre}} and {{lastname}} to insert the dynamic data. The mail is sent using the template but the {{name}} and {{lastname}} are not replaced on the mail for the variable data. I also tried other options like *|name|* or /{{name}} etc. nothing works. I checked the API logs and the info is sent to mandrill, but for some reason the theme is not replacing the info.
I tested with a very simple html like this:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>Hello {nombre} {{nombre}} {{{nombre}}}
|nombre|
*|nombre|*|*nombre*|
“{nombre}” “{{nombre}}” “{{{nombre}}}”
‘{nombre}’ ‘{{nombre}}’ ‘{{{nombre}}}’</body>
</html>What I’m doing wrong?
The topic ‘WPMandrill template not changing the {{variable}} data’ is closed to new replies.