/** * Adds the carbon copy receiver of the mail message when configured * * Checks the address if it is a valid email address * * @return void */ protected function setCc() { if ($this->typoScript['ccEmail'] && \TYPO3\CMS\Core\Utility\GeneralUtility::validEmail($this->typoScript['ccEmail'])) { $this->mailMessage->AddCc(trim($this->typoScript['ccEmail'])); } }