Swift_Mime_SimpleMessage::addTo PHP Method

addTo() public method

If $name is passed this name will be associated with the address.
public addTo ( string $address, string $name = null ) : Swift_Mime_SimpleMessage
$address string
$name string optional
return Swift_Mime_SimpleMessage
    public function addTo($address, $name = null)
    {
        $current = $this->getTo();
        $current[$address] = $name;
        return $this->setTo($current);
    }

Same methods

Swift_Mime_SimpleMessage::addTo ( string $address, string $name = null )