Enviar correos en HTML con Drupal Webform

Webform por defecto envía las plantillas en formato de texto plano. Para enviar los correos en HTML hay que añadir el siguiente hook en el fichero template.php del tema que estemos utilizando.

function phptemplate_webform_mail_headers($form_values, $node, $sid, $cid) {
  $headers = array(
    'Content-Type'  => 'text/html; charset=UTF-8; format=flowed; delsp=yes',
    'X-Mailer'      => 'Drupal Webform (PHP/'. phpversion() .')',
  );
  return $headers;
}

No olvides limpiar la caché antes de probarlo.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>