52 $this->mailer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\
TYPO3\CMS\Core\Mail\Mailer::class);
60 public function send()
63 if (empty($this->getFrom())) {
66 if (empty($this->getReplyTo())) {
68 if (!empty($replyTo)) {
74 $this->getHeaders()->addTextHeader(
'X-Mailer', $this->mailerHeader);
75 return $this->mailer->send($this, $this->failedRecipients);
107 return parent::setReturnPath($address);
119 public function setSender($address, $name =
null)
122 return parent::setSender($address, $name);
137 public function setFrom($addresses, $name =
null)
140 return parent::setFrom($addresses, $name);
155 public function setReplyTo($addresses, $name =
null)
158 return parent::setReplyTo($addresses, $name);
174 public function setTo($addresses, $name =
null)
177 return parent::setTo($addresses, $name);
190 public function setCc($addresses, $name =
null)
193 return parent::setCc($addresses, $name);
206 public function setBcc($addresses, $name =
null)
209 return parent::setBcc($addresses, $name);
221 return parent::setReadReceiptTo($addresses);
232 if (!is_array($addresses)) {
236 foreach ($addresses as $email => $name) {
237 if (ctype_digit($email)) {
244 return $newAddresses;
257 if (!is_string($email)) {
261 $atPosition = strrpos($email,
'@');
262 if (!$atPosition || $atPosition + 1 === strlen($email)) {
266 $domain = substr($email, $atPosition + 1);
267 $local = substr($email, 0, $atPosition);
268 $domain = \TYPO3\CMS\Core\Utility\GeneralUtility::idnaEncode($domain);
270 return $local .
'@' . $domain;