Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I send HTML mail using the Mime Mail module on my multilingual site.
To get HTML to properly be rendered in the privatemsg email body, I had to make the following change:
function pm_email_notify_text($key, $language = NULL) {
$text = _pm_email_notify_source_text($key);
$function = 'i18n_string_translate';
if (function_exists($function)) {
$translated = $function('pm_email_notify:mail:mail:' . $key, $text, array('langcode' => isset($language) ? $language->language : NULL));
return $translated;
}
return $text;
}
to:
$translated = $function('pm_email_notify:mail:mail:' . $key, $text, array('langcode' => isset($language) ? $language->language : NULL, 'format' => 'full_html'));
I'll try to put a patch together later but I wanted to make a quick note of it for now.
Comments
Comment #1
ivnish CreditAttribution: ivnish commented