if ($message instanceof TemplatedEmail && !
$message->
isRendered()) { throw new LogicException(sprintf('You must configure a "%s" when a "%s" instance has a text or HTML template set.', BodyRendererInterface::
class,
get_debug_type($message)));
} $sentMessage =
new SentMessage($message,
$envelope);
try { $this->
doSend($sentMessage);
} catch (\Throwable
$error) { $this->dispatcher->
dispatch(new FailedMessageEvent($message,
$error));
$this->
checkThrottling();
throw $error;
} $this->dispatcher->
dispatch(new SentMessageEvent($sentMessage));
return $sentMessage;
} finally { $this->
checkThrottling();
} }