/** * @param null|string $mode * @throws MailerException */ public function setMode($mode = null) { if (empty($mode)) { $mode = OutboundEmailConfigurationPeer::MODE_DEFAULT; } $mode = strtolower($mode); // make sure it's lower case if (!OutboundEmailConfigurationPeer::isValidMode($mode)) { throw new MailerException("Invalid Mailer: '{$mode}' is an invalid mode", MailerException::InvalidMailer); } $this->mode = $mode; }