WordPress.org

Ready to get started?Download WordPress

Forums

wpMandrill
[resolved] How to set different merge tags "values" for each recipient? (4 posts)

  1. spearhead
    Member
    Posted 1 year ago #

    When sending a single template to multiple recipients, how to set different values for merge tags?

    For example there is a merge tag "FNAME" for the first name of the recipient. How do I pass different the first name values for each recipient?

    I already have merge tags working, when sending an email to a single recipient.

    http://wordpress.org/extend/plugins/wpmandrill/

  2. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    You'll need to use the $merge_vars parameters of the wpMandrill:mail function. This is its schema:

    static function mail( $to, $subject, $html, $headers = '', $attachments = array(),
    	                        $tags = array(),
    	                        $from_name = '',
    	                        $from_email = '',
    	                        $template_name = '',
    	                        $track_opens = true,
    	                        $track_clicks = true,
    	                        $url_strip_qs = false,
    	                        $merge = true,
    	                        $global_merge_vars = array(),
    	                        $merge_vars = array(),
    	                        $google_analytics_domains = array(),
    	                        $google_analytics_campaign = array(),
    	                        $meta_data = array()
    
    	                     )

    You can read about the expected structure for each parameter here:
    https://mandrillapp.com/api/docs/messages.html#method=send-template

  3. alexphelps3
    Member
    Posted 1 year ago #

    Hey Will,

    I'm looking to setup a email template that will be used for WordPress Notifications that are now sent through wpMandrill.

    Do you have any sample templates that are setup and working properly with wpMandrill?

  4. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Alex,

    Sure, please check this blog post:
    http://blog.mandrill.com/own-your-wordpress-email-with-mandrill.html

    It has many interesting hacks, including many templates related.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags