WordPress.org

Ready to get started?Download WordPress

Forums

wpMandrill
Sending Plain and HTML Emails (2 posts)

  1. benjaminprojas
    Member
    Posted 8 months ago #

    I am a plugin developer integrating my product with wpMandrill. I am currently using the wpMandrill::mail() function to send my emails. Since I like to use both HTML and Plain text emails, I have to send the HTML data into the mail function and then use the mandrill_payload filter to override the message before it is sent and add in the 'text' parameter.

    Are there any plans to incorporate the html/text into the mail function directly so we don't have to do this workaround?

    Thanks!

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

  2. MC_Will
    Member
    Plugin Author

    Posted 8 months ago #

    Hi,

    For plugin developers, I'd recommend using wpMandrill::sendEmail() instead of ::mail()

    sendEmail( $message, $tags = array(), $template_name = '', $track_opens = true, $track_clicks = true )

    $message has the same structure expected by the Mandrill send API call, so you can send your own text parameter.

    However, if you don't include it, Mandrill will automatically add one using our HTML-to-Text converter.

Reply

You must log in to post.

About this Plugin

About this Topic