alexknowshtml / postmark-approved-wordpress-plugin

A Wordpress Plugin that overrides wp_mail() to use Postmark for transactional email delivery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Headers not parsed correctly when given as array.

jeremyzahner opened this issue · comments

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.