Commit 5fa656cd authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[BUGFIX] Solving an issue with empty values

parent 4286b2f9
......@@ -476,8 +476,11 @@ class MailTemplateService {
* @return MailTemplateService
*/
public function setFromAddress($fromAddress, $fromName = '') {
$this->fromAddress = $fromAddress;
$this->mailMessage->setFrom($fromAddress, $fromName);
if ($fromAddress) {
$this->fromAddress = $fromAddress;
$this->mailMessage->setFrom($fromAddress, $fromName);
}
return $this;
}
......@@ -486,8 +489,11 @@ class MailTemplateService {
* @return MailTemplateService
*/
public function setCcAddresses($ccAddresses) {
$this->ccAddresses = $ccAddresses;
$this->mailMessage->setCc(explode(',', $this->ccAddresses));
if ($ccAddresses) {
$this->ccAddresses = $ccAddresses;
$this->mailMessage->setCc(explode(',', $this->ccAddresses));
}
return $this;
}
......@@ -496,8 +502,11 @@ class MailTemplateService {
* @return MailTemplateService
*/
public function setReplyToAddress($replyToAddress) {
$this->replyToAddress = $replyToAddress;
$this->mailMessage->setReplyTo($replyToAddress);
if ($replyToAddress) {
$this->replyToAddress = $replyToAddress;
$this->mailMessage->setReplyTo($replyToAddress);
}
return $this;
}
......@@ -551,8 +560,11 @@ class MailTemplateService {
* @return MailTemplateService
*/
public function setBccAddresses($bccAddresses) {
$this->bccAddresses = $bccAddresses;
$this->mailMessage->setBcc(explode(',', $this->bccAddresses));
if ($bccAddresses) {
$this->bccAddresses = $bccAddresses;
$this->mailMessage->setBcc(explode(',', $this->bccAddresses));
}
return $this;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment