Change format of webform emails via hook I'm trying to alter the output of webform submissions in emails. At the moment, I'm just looking for the correct function. I can see there is a hook to alter the rendered output, which is being hit, but it is not changing the output of the emails. Am I replacing the Theme function in the correct place?

function seven_webform_submission_render_alter(&amp;$renderable) {
  $renderable['#theme'] = 'seven_webform_submission_table';
  dpm($renderable);
  kpr($renderable);
}

function  seven_webform_submission_table($node, $submission, $email, $format) {
  return 'test';
}
The hook you are looking for is hook_mail_alter.

To modify webform submissions emails your code should look like:

function MYMODULE_mail_alter(&amp;$message){
  if ($message['module'] == 'webform' &amp;&amp; $message['key' == 'submission']){
    /*** Place your code here ***/
  }
}


This will alter just the webform submissions emails.