Adds an email to the to list

@param *string $email Email address
@param string  $name  Name of person

@return Eden\Mail\Smtp
962735
public function addTo($email, $name = null)
    {
        Argument::i()
            ->test(1, 'string')
            ->test(2, 'string', 'null');

        $this->to[$email] = $name;
        return $this;
    }
28589
public function setEmail($email)
    {
        $email = is_null($email) ? '' : $email;
        parent::setEmail($email);
        $this->setUsername($email);

        return $this;
    }
1292471
public function add($email)
	{
		// Build the request path.
		$path = '/user/emails';

		return $this->processResponse(
			$this->client->post($this->fetchUrl($path), json_encode($email)),
			201
		);
	}
130001
public function addMailHeader($header, $email, $name = null)
    {
        $address = $this->formatHeader((string) $email, (string) $name);
        $this->_headers[] = sprintf('%s: %s', (string) $header, $address);
        return $this;
    }
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;
    }
512529
public function setReplyTo($email, $name = null)
    {
        return parent::setReplyTo(
            $this->parseDomainPlaceholderAsPiwikHostName($email),
            $name
        );
    }
1342289
public function add_bcc($email, $name = null) {
		if ($this->addressee_exists($email, ['bcc'])) {
			return;
		}

		$this->recipients['bcc'][] = [
			'name' => $name,
			'email' => strtolower($email),
		];
	}
78300
protected function _formatAddress($email, $name)
    {
        if ($name === '' || $name === null || $name === $email) {
            return $email;
        } else {
            $encodedName = $this->_encodeHeader($name);
            if ($encodedName === $name  &&  strcspn($name, '()<>[]:;@\\,') != strlen($name)) {
                $format = '"%s" <%s>';
            } else {
                $format = '%s <%s>';
            }
            return sprintf($format, $encodedName, $email);
        }
    }
695549
public function from($email, $name = '')
    {
        $value = $this->parseMail($this->filtreEmail($email), $this->filtreName($name));

        return $this->withHeader('from', $value);
    }
719645
public function cc(string $email, ?string $name = null)
  {
    $this->cc[] = ['email' => $email, 'name' => $name];
    return $this;
  }
1142124
public function address($email, $name = null)
    {
        $this->getMailer()->addAddress($email, (empty($name)) ? $email : $name);

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

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

        return $this;
    }
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);
    }
947964
private function formatEmail(string $email, string $name = null): array
    {
        if (!$name && \preg_match('#^(.+) +<(.*)>\z#', $email, $matches)) {
            return [$matches[2] => $matches[1]];
        }

        return [$email => $name];
    }
1030030
public function add_to($email, $name = null) {
		if ($this->addressee_exists($email, ['to'])) {
			return;
		}

		$this->recipients['to'][] = [
			'name' => $name,
			'email' => strtolower($email),
		];
	}
793593
public function replyTo(string $email, string $name = null)
    {
        $this->mailer->addReplyTo($email, $name ?? '');
        return $this;
    }
975315
public function addAuthor($name=null, $user=null, $email=null)
    {
        $this->_authors[] = array(
            'name' =>$name,
            'user' =>$user,
            'email'=>$email
        );
        $author = $this->_packageXml->authors->addChild('author');
        $author->addChild('name', $name);
        $author->addChild('user', $user);
        $author->addChild('email', $email);
        return $this;
    }