Hi there,

Trying to send emails using MimeMail and there is an issue whereby the body value is sent as a single value to elasticEmailSend() if it's plain OR HTML, meaning that the value contains both the plain text and HTML value concatenated.

Ideally we can use drupal_html_to_text() to generate a plain text value of the HTML output? Then pass both values through to elasticEmailSend().

Essentially this is the same issue as per this Mandrill issue - https://www.drupal.org/node/1863988.

Thanks,
Luke

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

luketsimmons created an issue. See original summary.

mike.davis’s picture

Here is a patch which sets the text version of a HTML email using drupal_html_to_text()

mike.davis’s picture

Here is an updated patch provided by @luketsimmons which adds support for theming a HTML email template for your site when using something like Mimemail.

mike.davis’s picture

Although this works, having had a play with it it defaults to always sending using the HTML template.

A setting should be added to the admin settings which enables an admin to decide if the site is going to use plain text or HTML emails, and/ or if the email that is being sent is HTML needs to be determined to then decide if to use the template or send as plain text?

mike.davis’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
mike.davis’s picture