Sets the Recipient of the email.

@param string $email
@param string $name

@return \Scara\Mail\Mailer
504964
public function setTo($email, $name = '')
    {
        if (empty($email)) {
            throw new MailerException('email is required for setTo!');
        }

        if (empty($name)) {
            $name = substr($email, 0, strrpos($email, '@'));
        }

        if (is_null($this->to)) {
            $this->to = [$email, $name];
        } else {
            throw new MailerException('A master recipient has already been set!');
        }

        return $this;
    }
80879
public function addReplyTo($email, $name = null)
    {
        $this->getMailer()->addReplyTo($email, empty($name) ? $email : $name);
        
        return $this;
    }
1356957
public function from($email, $name = false)
	{
		$this->config['from']['email'] = (string) $email;
		$this->config['from']['name']  = (is_string($name)) ? $name : false;

		if ($this->config['encode_headers'] and $this->config['from']['name'])
		{
			$this->config['from']['name'] = $this->encode_mimeheader((string) $this->config['from']['name']);
		}

		return $this;
	}
699800
public function set_sender($email)
        {
            $parts = $this->parse_email($email);
            $this->from_user = $parts[0];
            $this->from_domain = $parts[1];
        }
771528
public function setEmail($email)
    {
        $email = (string) $email;

        if ($this->exists() && $this->email !== $email) {
            $this->updated['email'] = true;
        }

        $this->email = $email;

        return $this;
    }
839998
public function addTo($email, $name = null)
    {
        $this->to = array_merge($this->to, $this->transformEmailName($email, $name));

        return $this;
    }
42866
public function addBcc($email, $name = null)
    {
        $this->bcc = array_merge($this->bcc, $this->transformEmailName($email, $name));

        return $this;
    }
221712
protected function getMailer($name, Email $email = null)
    {
        if ($email === null) {
            $email = new Email();
        }

        $className = App::className($name, 'Mailer', 'Mailer');

        if (empty($className)) {
            throw new MissingMailerException(compact('name'));
        }

        return new $className($email);
    }
1022607
public function setOwner($name = '', $email = '')
    {
        if (!empty($email)) {
        	/**
        	 * @see Zend_Validate_EmailAddress
        	 */
        	require_once 'Zend/Validate/EmailAddress.php';
            $validate = new Zend_Validate_EmailAddress();
            if (!$validate->isValid($email)) {
                /**
                 * @see Zend_Feed_Builder_Exception
                 */
                require_once 'Zend/Feed/Builder/Exception.php';
                throw new Zend_Feed_Builder_Exception("you have to set a valid email address into the itunes owner's email property");
            }
        }
        $this->offsetSet('owner', array('name' => $name, 'email' => $email));
        return $this;
    }
1129228
public function addBCC($email, $name = null)
    {
        Argument::i()
            ->test(1, 'string')
            ->test(2, 'string', 'null');

        $this->bcc[$email] = $name;
        return $this;
    }
920043
public function setTo($address, $name = null) : EmailInterface
    {
        $this->mailer->addAddress($address, $name);

        return $this;
    }
638123
function setSender( $email, $name = false )
    {
        $this->Mail->from = new ezcMailAddress( $email, $name, $this->usedCharset() );
        $this->From = array( 'name' => $name,
                             'email' => $email );
    }
7719
public function add(string $email, string $name = null): void
    {
        $recipient = $this->make();
        $recipient->email = $email;
        if ($name !== null) {
            $recipient->name = $name;
        }
        $this->set($recipient);
    }
985429
public function to($email = null, $name = null)
    {
        deprecationWarning('Email::to() is deprecated. Use Email::setTo() or Email::getTo() instead.');

        if ($email === null) {
            return $this->getTo();
        }

        return $this->setTo($email, $name);
    }
540564
public function bcc($email, $name = '')
    {
        if (empty($email)) {
            throw new MailerException('email is required for bcc!');
        }

        $this->_mailer->addBCC($email, $name);

        return $this;
    }
220135
public function addCc( $email, $name = null )
	{
		$this->object->addCc( $email, $name );
		return $this;
	}
198762
public function replyTo($emailAddress, $name = null)
    {
        $this->message->setReplyTo((string)$emailAddress, (string)$name);
        return $this;
    }