Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
throw exception when sending on a transport that is not started
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Sep 11, 2018
1 parent dd8f20b commit e96c159
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/classes/Swift/Transport/AbstractSmtpTransport.php
Expand Up @@ -177,6 +177,10 @@ public function isStarted()
*/
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
{
if (!$this->started) {
$this->throwException(new Swift_TransportException('Cannot send messages when the transport is not started'));
}

$sent = 0;
$failedRecipients = (array) $failedRecipients;

Expand Down

0 comments on commit e96c159

Please sign in to comment.