mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
2f2910eac3
commit
c4d966c6a1
@ -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()}
|
||||
@ -381,7 +381,9 @@ class Email extends ViewableData {
|
||||
if(empty($this->from)) $this->from = Email::getAdminEmail();
|
||||
|
||||
$this->setBounceHandlerURL($this->bounceHandlerURL);
|
||||
|
||||
|
||||
$headers = $this->customHeaders;
|
||||
|
||||
$headers['X-SilverStripeBounceURL'] = $this->bounceHandlerURL;
|
||||
|
||||
if($messageID) $headers['X-SilverStripeMessageID'] = project() . '.' . $messageID;
|
||||
@ -432,7 +434,7 @@ class Email extends ViewableData {
|
||||
* @return bool Success of the sending operation from an MTA perspective.
|
||||
* Doesn't actually give any indication if the mail has been delivered to the recipient properly)
|
||||
*/
|
||||
public function send( $messageID = null ) {
|
||||
public function send($messageID = null) {
|
||||
Requirements::clear();
|
||||
|
||||
$this->parseVariables();
|
||||
|
Loading…
x
Reference in New Issue
Block a user