function theme_webform_mail_headers in Webform 5.2
Same name and namespace in other branches
- 6.3 webform.module \theme_webform_mail_headers()
- 6.2 webform.module \theme_webform_mail_headers()
- 7.4 webform.module \theme_webform_mail_headers()
- 7.3 webform.module \theme_webform_mail_headers()
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:
- submitted: All the submitted values in a single array keyed by webform component IDs. Useful for simply looping over the values.
- submitted_tree: All the submitted values in a tree-structure array, keyed by the Form Key values defined by the user.
$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.
1 theme call to theme_webform_mail_headers()
File
- ./
webform.module, line 1952
Code
function theme_webform_mail_headers($form_values, $node, $sid, $cid) {
$headers = array(
'X-Mailer' => 'Drupal Webform (PHP/' . phpversion() . ')',
);
return $headers;
}