public function validateEmailSender($email)
    {
        if (mb_strlen($email, 'UTF-8') > 255) {
            $this->addError(EmailConfigurationTransformer::EMAIL_SENDER, 'Sender email length has to be less or equal to 255');
            return false;
        }

        if (!empty($email)) {
            $emailValidator = new EmailValidator();
            if (!$emailValidator->isValid($email, new RFCValidation())) {
                $this->addError(EmailConfigurationTransformer::EMAIL_SENDER, 'Sender email must be an email address');
                return false;
            }
        }

        return true;
    }
public function validateEmailSender($email)
    {
        if (mb_strlen($email, 'UTF-8') > 255) {
            $this->addError(EmailConfigurationTransformer::EMAIL_SENDER, 'Sender email length has to be less or equal to 255');
            return false;
        }

        if (!empty($email)) {
            $emailValidator = new EmailValidator();
            if (!$emailValidator->isValid($email, new RFCValidation())) {
                $this->addError(EmailConfigurationTransformer::EMAIL_SENDER, 'Sender email must be an email address');
                return false;
            }
        }

        return true;
    }
public function validateEmailSender ( $ email ) { if ( mb_strlen ( $ email , 'UTF-8' ) > 255 ) { $ this -> addError ( EmailConfigurationTransformer :: EMAIL_SENDER , 'Sender email length has to be less or equal to 255' ) ; return false ; } if ( ! empty ( $ email ) ) { $ emailValidator = new EmailValidator ( ) ; if ( ! $ emailValidator -> isValid ( $ email , new RFCValidation ( ) ) ) { $ this -> addError ( EmailConfigurationTransformer :: EMAIL_SENDER , 'Sender email must be an email address' ) ; return false ; } } return true ; }
Validate sender email address

@param mixed $email

@return bool
Validate sender email address