Headers not parsed correctly when given as array.
jeremyzahner opened this issue · comments
Jeremy "Jay" Zahner commented
Your version of wp_mail expects the headers to come as a string, but the official WordPress-version accepts arrays as well.
From the Wordpress Code Reference http://codex.wordpress.org/Function_Reference/wp_mail
<?php
// Example using the array form of $headers
// assumes $to, $subject, $message have already been defined earlier...
$headers[] = 'From: Me Myself <me@example.net>';
$headers[] = 'Cc: John Q Codex <jqc@wordpress.org>';
$headers[] = 'Cc: iluvwp@wordpress.org'; // note you can just use a simple email address
wp_mail( $to, $subject, $message, $headers );
?>
Headers won't get adapted correctly.