public function checkIsValidEmailOrEmpty(
        $fieldName,
        $canUseFlexforms,
        $sheet,
        $unused,
        $explanation
    ) {
        $value = $this->objectToCheck->getConfValueString($fieldName, $sheet);
        if ($value === '') {
            return;
        }

        if (!GeneralUtility::validEmail($value)) {
            $message = 'The e-mail address in <strong>' . $this->getTSSetupPath()
                . $fieldName . '</strong> is set to <strong>' . $value . '</strong> '
                . 'which is not valid. E-mails might not be received as long as '
                . 'this address is invalid.<br />';
            $this->setErrorMessageAndRequestCorrection(
                $fieldName,
                $canUseFlexforms,
                $message . $explanation
            );
        }
    }
public function checkIsValidEmailOrEmpty(
        $fieldName,
        $canUseFlexforms,
        $sheet,
        $unused,
        $explanation
    ) {
        $value = $this->objectToCheck->getConfValueString($fieldName, $sheet);
        if ($value === '') {
            return;
        }

        if (!GeneralUtility::validEmail($value)) {
            $message = 'The e-mail address in <strong>' . $this->getTSSetupPath()
                . $fieldName . '</strong> is set to <strong>' . $value . '</strong> '
                . 'which is not valid. E-mails might not be received as long as '
                . 'this address is invalid.<br />';
            $this->setErrorMessageAndRequestCorrection(
                $fieldName,
                $canUseFlexforms,
                $message . $explanation
            );
        }
    }
public function checkIsValidEmailOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ unused , $ explanation ) { $ value = $ this -> objectToCheck -> getConfValueString ( $ fieldName , $ sheet ) ; if ( $ value === '' ) { return ; } if ( ! GeneralUtility :: validEmail ( $ value ) ) { $ message = 'The e-mail address in <strong>' . $ this -> getTSSetupPath ( ) . $ fieldName . '</strong> is set to <strong>' . $ value . '</strong> ' . 'which is not valid. E-mails might not be received as long as ' . 'this address is invalid.<br />' ; $ this -> setErrorMessageAndRequestCorrection ( $ fieldName , $ canUseFlexforms , $ message . $ explanation ) ; } }
Checks that an e-mail address is valid or empty.

@param string $fieldName
TS setup field name to mention in the warning, must not be empty
@param bool $canUseFlexforms
whether the value can also be set via flexforms (this will be
mentioned in the error message)
@param string $sheet
flexforms sheet pointer, eg. "sDEF", will be ignored if
$canUseFlexforms is set to FALSE
@param bool $unused unused
@param string $explanation
a sentence explaining what that configuration value is needed for,
must not be empty

@return void
Checks that an e - mail address is valid or empty .