yii\mail\BaseMailer::sendMultiple PHP 메소드

sendMultiple() 공개 메소드

The default implementation simply calls BaseMailer::send multiple times. Child classes may override this method to implement more efficient way of sending multiple messages.
public sendMultiple ( array $messages ) : integer
$messages array list of email messages, which should be sent.
리턴 integer number of messages that are successfully sent.
    public function sendMultiple(array $messages)
    {
        $successCount = 0;
        foreach ($messages as $message) {
            if ($this->send($message)) {
                $successCount++;
            }
        }
        return $successCount;
    }