Invoke the Emailer's ::doSend method.

@param EmailInterface $email
@return boolean
553775
public function send(EmailInterface $email)
    {
        foreach ($this->writers as $writer) {
            $content = $email->accept($writer);

            if ($content !== null) {
                return $this->doSend($content, $email);
            }
        }

        throw new \RuntimeException(
            "No visit method for " . get_class($email) . " found among writers."
        );
    }
1125463
public function setEmail($email)
    {
        if (!empty($email) && is_string($email) && ctype_print($email)) {
            $this->email = trim($email);
        }

        return $this;
    }
1204141
public function setEmail($email)
    {
        $this->email = $email;
        $this->referenceId = null;
        $this->executed = false;
        return $this;
    }
389983
public function withEmail($email)
    {
        $request = clone $this;
        $request->email = $email instanceof Email ? $email : new Email($email);

        return $request;
    }
665599
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $userService = new UserService($this->userStore);

        /** @var $dialog \Symfony\Component\Console\Helper\DialogHelper */
        $dialog = $this->getHelperSet()->get('dialog');

        // Function to validate mail address.
        $mailValidator = function ($answer) {
            if (!filter_var($answer, FILTER_VALIDATE_EMAIL)) {
                throw new \InvalidArgumentException(Lang::get('must_be_valid_email'));
            }

            return $answer;
        };

        $adminEmail = $dialog->askAndValidate($output, Lang::get('enter_email'), $mailValidator, false);
        $adminName = $dialog->ask($output, Lang::get('enter_name'));
        $adminPass = $dialog->askHiddenResponse($output, Lang::get('enter_password'));

        try {
            $userService->createUser($adminName, $adminEmail, $adminPass, true);
            $output->writeln(Lang::get('user_created'));
        } catch (\Exception $e) {
            $output->writeln(sprintf('<error>%s</error>', Lang::get('failed_to_create')));
            $output->writeln(sprintf('<error>%s</error>', $e->getMessage()));
        }
    }
742171
public function validateEmail($email)
    {
        $person = $this->getService('repos:people.person')->find(array('email' => $email));

        if ($person) {
            $this->setMessage('Email is already in use');
            return false;
        }

        return true;
    }
981021
public function isEmailTaken( $email, $excludeId = null )
    {
        return $this->isExists( empty( $excludeId ) ? array(
            'email' => $email,
        ) : array(
            'email' => $email,
            new Predicate\Operator(
                'id',
                Predicate\Operator::OP_NE,
                $excludeId
            ),
        ) );
    }
1000423
protected function _validateEmail($email, $context)
    {
        if ($this->_emailPattern === null) {
            if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
                return;
            }
        } elseif (preg_match($this->_emailPattern, $email)) {
            return;
        }

        $context = ltrim($context, '_');
        if ($email == '') {
            throw new InvalidArgumentException(sprintf('The email set for "%s" is empty.', $context));
        }
        throw new InvalidArgumentException(sprintf('Invalid email set for "%s". You passed "%s".', $context, $email));
    }
1371647
public function isEmailExists( $email, $excludeId = null )
    {
        return $this->isExists( empty( $excludeId ) ? array(
            'email'     => $email,
            'confirmed' => true,
            new Predicate\Operator(
                'state',
                Predicate\Operator::OP_NE,
                Structure::STATE_INACTIVE
            ),
        ) : array(
            'email' => $email,
            new Predicate\Operator(
                'id',
                Predicate\Operator::OP_NE,
                $excludeId
            ),
        ) );
    }
1119956
public function send(Email $email) {
		if (!empty($this->_config['queue'])) {
			$this->_config = $this->_config['queue'] + $this->_config;
			$email->setConfig((array)$this->_config['queue'] + ['queue' => []]);
			unset($this->_config['queue']);
		}

		$transport = $this->_config['transport'];
		$email->setTransport($transport);

		/** @var \Queue\Model\Table\QueuedJobsTable $QueuedJobs */
		$QueuedJobs = TableRegistry::getTableLocator()->get('Queue.QueuedJobs');
		$result = $QueuedJobs->createJob('Email', ['transport' => $transport, 'settings' => $email]);
		$result['headers'] = '';
		$result['message'] = '';

		return $result->toArray();
	}
1005797
public function isEmail($email) {

		if (\function_exists('idn_to_ascii')) {
			$email = @\idn_to_ascii($email);
		}

		return (bool) \filter_var($email, FILTER_VALIDATE_EMAIL);
	}
898772
public static function isEmail($email)
    {
        $pattern = "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i";
        if (is_string($email) && preg_match($pattern, $email)) {
            return true;
        }

        return false;
    }
683783
public function send(Email $email)
    {
        if (!$this->connected()) {
            $this->_connect();
            $this->_auth();
        } else {
            $this->_smtpSend('RSET');
        }

        $this->_sendRcpt($email);
        $this->_sendData($email);

        if (!$this->_config['keepAlive']) {
            $this->_disconnect();
        }

        return $this->_content;
    }
279445
public function setReplyTo($email)
    {
        if ($this->isValidEmail($email) === true) {
            $this->reply_to = $email;
        } else {
            return false;
        }
    }
695716
public function setEmail($email)
    {
        $email = trim($email);

        if (preg_match('/\<(.*)\>/', $email, $matches)) {
            $email = trim(str_replace($matches[ 0 ], '', $email));
            $name = $matches[ 1 ];
        }

        if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
            $this->email = $email;

            if (isset($name)) {
                $this->setName($name);
            }
        }

        return $this;
    }
414827
public function setTo($email)
    {
        if (is_string($email)) {
            $email = [ $email ];
        }

        if (!is_array($email)) {
            throw new InvalidArgumentException(
                'Must be an array of recipients.'
            );
        }

        $this->to = [];

        // At this point, `$email` can be an _email array_ or an _array of emails_...
        if (isset($email['email'])) {
            // Means we're not dealing with multiple emails
            $this->addTo($email);
        } else {
            foreach ($email as $recipient) {
                $this->addTo($recipient);
            }
        }

        return $this;
    }
218310
public function validate(EntityInterface $entity)
    {
        if (!$entity instanceof EmailConfiguration) {
            throw new Exception(
                sprintf('The Entity to validate must be an instance of %s', EmailConfiguration::class)
            );
        }

        $this->validateEmailSender($entity->getEmailSender());
        $this->validateEmailSenderName($entity->getEmailSenderName());
        $this->validateEmailSubjectPrefix($entity->getEmailSubjectPrefix());
        $this->validateEmailBodySignature($entity->getEmailBodySignature());

        $errors = $this->getErrors();

        return empty($errors);
    }