Swift_Transport_AbstractSmtpTransport::_doMailTransaction PHP 메소드

_doMailTransaction() 개인적인 메소드

Send an email to the given recipients from the given reverse path
private _doMailTransaction ( $message, $reversePath, array $recipients, array &$failedRecipients )
$recipients array
$failedRecipients array
    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;
    }