public function setFrom($email, $name = null)
    {
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw new \Parable\Mail\Exception("Email provided is invalid: {$email}");
        }
        $this->addresses['from'] = [
            [
                'email' => $email,
                'name'  => $name,
            ]
        ];
        return $this;
    }
public function setFrom($email, $name = null)
    {
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw new \Parable\Mail\Exception("Email provided is invalid: {$email}");
        }
        $this->addresses['from'] = [
            [
                'email' => $email,
                'name'  => $name,
            ]
        ];
        return $this;
    }
public function setFrom ( $ email , $ name = null ) { if ( ! filter_var ( $ email , FILTER_VALIDATE_EMAIL ) ) { throw new \ Parable \ Mail \ Exception ( "Email provided is invalid: {$email}" ) ; } $ this -> addresses [ 'from' ] = [ [ 'email' => $ email , 'name' => $ name , ] ] ; return $ this ; }
Set the from address.

@param string      $email
@param null|string $name

@return $this
@throws \Parable\Mail\Exception
Set the from address .