public function setSender($email) {
    if (!$this->checkValidEmail($email)) {
      throw new \InvalidArgumentException(
          "Invalid sender: ". htmlspecialchars($email));
    }
    $this->message->setSender($email);
  }
public function setSender($email) {
    if (!$this->checkValidEmail($email)) {
      throw new \InvalidArgumentException(
          "Invalid sender: ". htmlspecialchars($email));
    }
    $this->message->setSender($email);
  }
public function setSender ( $ email ) { if ( ! $ this -> checkValidEmail ( $ email ) ) { throw new \ InvalidArgumentException ( "Invalid sender: " . htmlspecialchars ( $ email ) ) ; } $ this -> message -> setSender ( $ email ) ; }
Sets the sender for the mail object.

@param string $email Email of the sender.
@throws \InvalidArgumentException If the input sender is an invalid email
address.
Sets the sender for the mail object .