Commit 9977920c authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Fixing multiple issues with api

parent 324fa8df
......@@ -39,37 +39,37 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
class MailTemplateService {
/**
* @var array
* @var array $registerArray
*/
private static $registerArray = [];
/**
* @var array toAddresses
* @var array $toAddresses
*/
private $toAddresses = [];
/**
* @var string fromAddress
* @var string $fromAddress
*/
private $fromAddress;
/**
* @var array ccAddresses
* @var array $ccAddresses
*/
private $ccAddresses = [];
/**
* @var string replyToAddress
* @var string $replyToAddress
*/
private $replyToAddress;
/**
* @var string language
* @var string $language
*/
private $language;
/**
* @var boolean ignoreMailQueue
* @var boolean $ignoreMailQueue
*/
private $ignoreMailQueue = TRUE;
......@@ -79,32 +79,37 @@ class MailTemplateService {
private $mailMessage;
/**
* @var string templateName
* @var string $templateName
*/
private $templateName;
/**
* @var string extensionKey
* @var string $extensionKey
*/
private $extensionKey;
/**
* @var array content
* @var array $markers
*/
private $markers = [];
/**
* @var string subject
* @var string $subject
*/
private $subject;
/**
* holds the TypoScript configuration for sg_mail
*
* @var array tsSettings
* @var array $tsSettings
*/
private $tsSettings = [];
/**
* @var array $bccAddresses
*/
private $bccAddresses = [];
/**
* MailTemplateService constructor.
*/
......@@ -220,7 +225,7 @@ class MailTemplateService {
* @param array|string $fromAddress
* @return MailTemplateService
*/
public function setFromAddresses($fromAddress) {
public function setFromAddress($fromAddress) {
$this->fromAddress = $fromAddress;
$this->mailMessage->setFrom($fromAddress);
return $this;
......@@ -241,7 +246,7 @@ class MailTemplateService {
* @return MailTemplateService
*/
public function setReplyToAddress($replyToAddress) {
$this->$replyToAddress = $replyToAddress;
$this->replyToAddress = $replyToAddress;
$this->mailMessage->setReplyTo($replyToAddress);
return $this;
}
......@@ -300,4 +305,16 @@ class MailTemplateService {
$this->markers = $markers;
return $this;
}
/**
* @param array $bccAddresses
* @return MailTemplateService
*/
public function setBccAddresses(array $bccAddresses) {
$this->bccAddresses = $bccAddresses;
$this->mailMessage->setBcc($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