BUGFIX Explicitly define customHeaders as an array, and ensure send()/sendPlain() both use customHeaders

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73654 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-03-25 21:56:25 +00:00
parent 2f2910eac3
commit c4d966c6a1

View File

@ -89,7 +89,7 @@ class Email extends ViewableData {
/**
* @param array $customHeaders A map of header-name -> header-value
*/
protected $customHeaders;
protected $customHeaders = array();
/**
* @param array $attachements Internal, use {@link attachFileFromString()} or {@link attachFile()}
@ -382,6 +382,8 @@ class Email extends ViewableData {
$this->setBounceHandlerURL($this->bounceHandlerURL);
$headers = $this->customHeaders;
$headers['X-SilverStripeBounceURL'] = $this->bounceHandlerURL;
if($messageID) $headers['X-SilverStripeMessageID'] = project() . '.' . $messageID;