uiii
uiii

Reputation: 519

Drupal webform html mail

I've made a contact form with Webform module. But it doesn't send HTML emails. I have installed HTML mail, Mail MIME modules. HTML mail module's send test works fine, but mail from Webform is always converted to plain form instead of HTML. I've tried to set email headers using this function:

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

But it still doesn't work.

Edit: I've found that setting header works, so the mail is send as HTML, but the problem is, that content of email is converted to plain format (all HTML tags removed and "formatted" respectively)

Upvotes: 2

Views: 6686

Answers (3)

sinini
sinini

Reputation: 1433

it's an old post, but maybe still useful:

http://drupal.org/project/mimemail

this modul adds a checkbox to select, weather you want to send html-mails or not

Upvotes: 2

Fedir RYKHTIK
Fedir RYKHTIK

Reputation: 9984

Probably, You should use mailsystem module together with htmlmail module, to define the email processing spesially for Webform module.

http://drupal.org/project/mailsystem http://drupal.org/project/htmlmail

Upvotes: 0

nmc
nmc

Reputation: 8696

Looks like this should be a built in feature (as it was in Drupal 6 version of the webform module) but there are some issues with the Drupal 7 version. The webform module code points to issue https://drupal.org/node/1043086. Keep an eye on that thread for an update.

Upvotes: 0

Related Questions