You are here

function template_preprocess_htmlmail in HTML Mail 7

Same name and namespace in other branches
  1. 8.3 htmlmail.module \template_preprocess_htmlmail()
  2. 8 htmlmail.module \template_preprocess_htmlmail()
  3. 8.2 htmlmail.module \template_preprocess_htmlmail()
  4. 6.2 htmlmail.module \template_preprocess_htmlmail()
  5. 6 htmlmail.module \template_preprocess_htmlmail()
  6. 7.2 htmlmail.module \template_preprocess_htmlmail()

Process variables to format email messages.

See also

htmlmail.tpl.php

File

./htmlmail.module, line 84
Send system emails in HTML.

Code

function template_preprocess_htmlmail(&$variables) {
  $variables['path'] = url($variables['directory'], array(
    'absolute' => TRUE,
  ));
  $header = variable_get('htmlmail_header', array(
    'value' => '',
    'format' => NULL,
  ));
  $variables['header'] = check_markup($header['value'], $header['format']);
  $footer = variable_get('htmlmail_footer', array(
    'value' => '',
    'format' => NULL,
  ));
  $variables['footer'] = check_markup($footer['value'], $footer['format']);
  $variables['css'] = variable_get('htmlmail_css', '');
  $variables['template_files'][] = 'htmlmail-' . $variables['module'];
  $variables['debug'] = variable_get('htmlmail_debug', '0');
}