private function _doMailTransaction($message, $reversePath, array $recipients, array &$failedRecipients)
{
$sent = 0;
$this->_doMailFromCommand($reversePath);
foreach ($recipients as $forwardPath) {
try {
$this->_doRcptToCommand($forwardPath);
++$sent;
} catch (Swift_TransportException $e) {
$failedRecipients[] = $forwardPath;
}
}
if ($sent != 0) {
$this->_doDataCommand();
$this->_streamMessage($message);
} else {
$this->reset();
}
return $sent;
}