SparkPost\Transmission::toAddressString PHP Method

toAddressString() private method

Takes the longhand form of an email address and converts it to the shorthand form.
private toAddressString ( $address )
$address - the longhand form of an email address [ "name" => "John", "email" => "[email protected]" ]
    private function toAddressString($address)
    {
        // convert object to string
        if (!is_string($address)) {
            if (isset($address['name'])) {
                $address = '"' . $address['name'] . '" <' . $address['email'] . '>';
            } else {
                $address = $address['email'];
            }
        }
        return $address;
    }