Contributions API

theme_webform_mail_headers

Definition

theme_webform_mail_headers($form_values, $node, $sid, $cid)
contributions/webform/webform.module, line 1821

Description

Theme the headers when sending an email from webform.

Parameters

$form_values An array of all form values submitted by the user. The array contains three keys containing the following:

$node The complete node object for the webform.

$sid The submission ID of the new submission.

$cid If you desire to make different e-mail headers depending on the recipient, you can check this component ID to output different content. This will be the ID of the component that is a conditional e-mail recipient. For the normal e-mails, it will have the value of 'default'.

Return value

An array of headers to be used when sending a webform email. If headers for "From", "To", or "Subject" are set, they will take precendence over the values set in the webform configuration.

Code

<?php
function theme_webform_mail_headers($form_values, $node, $sid, $cid) {
  $headers = array(
    'X-Mailer' => 'Drupal Webform (PHP/'. phpversion() .')',
  );
  return $headers;
}
?>