public function setFrom($email, $name = null)
    {
        if (is_array($email)) {
            $this->from = [$email['email'] => $email['name']];
        } else {
            $this->from = is_object($email) || null === $name
                ? $email
                : array($email => $name);
        }

        return $this;
    }