mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX #3788 Default values are overwritten in Email constructor (rjmackay)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77273 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
834c143e61
commit
8c5eb9bcc6
@ -142,13 +142,13 @@ class Email extends ViewableData {
|
||||
* Create a new email.
|
||||
*/
|
||||
public function __construct($from = null, $to = null, $subject = null, $body = null, $bounceHandlerURL = null, $cc = null, $bcc = null) {
|
||||
$this->from = $from;
|
||||
$this->to = $to;
|
||||
$this->subject = $subject;
|
||||
$this->body = $body;
|
||||
$this->cc = $cc;
|
||||
$this->bcc = $bcc;
|
||||
$this->setBounceHandlerURL($bounceHandlerURL);
|
||||
if($from != null) $this->from = $from;
|
||||
if($to != null) $this->to = $to;
|
||||
if($subject != null) $this->subject = $subject;
|
||||
if($body != null) $this->body = $body;
|
||||
if($cc != null) $this->cc = $cc;
|
||||
if($bcc != null) $this->bcc = $bcc;
|
||||
if($bounceHandlerURL != null) $this->setBounceHandlerURL($bounceHandlerURL);
|
||||
}
|
||||
|
||||
public function attachFileFromString($data, $filename, $mimetype = null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user