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)
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
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.
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
精彩评论