Sending Plain and HTML Emails (2 posts)

  1. benjaminprojas
    Posted 3 years 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?



  2. MC_Will
    Plugin Author

    Posted 3 years ago #


    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • wpMandrill
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic