• Resolved risoto2000

    (@risoto2000)


    Hi, I need a very quick consultation, 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 = ‘[email protected]’, $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.

    What I’m doing wrong?

Viewing 1 replies (of 1 total)
  • Thread Starter risoto2000

    (@risoto2000)

    In case some one have this problem, Matt from Mandrill support and my friend Faizan help me to fix the code, this was the final solution:

    wpMandrill::mail($to, $subject, $html, ”, array(), array(), ‘cursos edu2’, ‘[email protected]’, ‘TEMPLATE’, true,true,false,true,array(
    array( ‘name’ => ‘nombre’, ‘content’ => ‘pepito perez’ ),
    array( ‘name’ => ‘otracosa’, ‘content’ => ‘faizan’ ),
    )

    );

    Also it was needed to change the TEMPLATE LANGUAGE from mailchimp to handlebars in mandrill page
    SETTINGS->SENDING DEFAULTS -> HANDLEBARS LANGUAGE.

    hope this will help others ??

Viewing 1 replies (of 1 total)
  • The topic ‘wpMandrill::mail’ is closed to new replies.