title: Contact Form 7 - Get final mail HTML output
body: <p>Is there a hook that will allow me to see exactly what is being sent out to an email?</p>
  <p>I've tried using <code>'wpcf7_mail_sent'</code> and all it contains is array of the data and fields.</p>
  <p>For example it has <code>&quot;first-name&quot;: &quot;John&quot;, &quot;last-name&quot;: &quot;Smith&quot;, ...</code> etc. but not template.</p>
  <p>What I want to get is the mail template merged with that data... aka the final email as HTML:</p>
  <p>For example: <code>Hello, John Smith! &lt;br&gt; Thanks for contacting us.</code></p>
  <h2>Edit: Clarification</h2>
  <p>(Using the example that @Howard E provided)</p>
  <pre><code>add_action( 'wpcf7_before_send_mail', 'dd_handle_form_submission', 10, 3 );
  function dd_handle_form_submission( $contact_form,$abort,$submission ) {
  
      $template = $contact_form-&gt;prop('mail')['body'];
      $posted_data = $submission-&gt;get_posted_data();
  
      //Outputs:
      //$template: &lt;h2&gt; First Name: [first-name] &lt;/h2&gt;    &lt;h2&gt; Last Name: [last-name] &lt;/h2&gt; ...
      //$posted_data: Array ( [first-name] =&gt; 'John', [last-name] =&gt; 'Smith' ... )
  }
  </code></pre>
  <p>That's the template but with shortcodes... and the data but as an array.</p>
  <p>My original question was how do I get the final output of the merged <code>$posted_data</code> + <code>$template</code> so an <code>$html</code> var would look like this:</p>
  <p><code>&quot;&lt;h2&gt; First Name: John &lt;/h2&gt;    &lt;h2&gt; Last Name: Smith &lt;/h2&gt;&quot;</code>...</p>