Example #1
0
 /**
  * {@inheritdoc}
  */
 public function send(MessageInterface $message)
 {
     if (false == $message instanceof TaggableInterface) {
         throw new \InvalidArgumentException('PeytzMail can only send messages which implement "TaggableInterface".');
     }
     parent::send($message);
 }
Example #2
0
 /**
  * {@inheritdoc}
  * @throws \InvalidArgumentException
  */
 public function setServerToken($serverToken)
 {
     if (false === strpos($serverToken, ':')) {
         throw new \InvalidArgumentException('MailGun uses a "custom.domain.tld:key-hash" based ServerToken');
     }
     parent::setServerToken($serverToken);
 }
 /**
  * {@inheritdoc}
  * @throws \InvalidArgumentException
  */
 public function setServerToken($serverToken)
 {
     if (false === strpos($serverToken, ':')) {
         throw new \InvalidArgumentException('SendGrid uses a "username:password" based ServerToken');
     }
     parent::setServerToken($serverToken);
 }