PHPMailer\PHPMailer
SMTP::recordLastTransactionID()
Extract and return the ID of the last SMTP transaction based on a list of patterns provided in SMTP::$smtp_transaction_id_patterns. Relies on the host providing the ID in response to a DATA command. If no reply has been received yet, it will return null. If no pattern was matched, it will return false.
Метод класса: SMTP{}
Хуков нет.
Возвращает
true|false|Строку|null
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->recordLastTransactionID();
Код SMTP::recordLastTransactionID() SMTP::recordLastTransactionID WP 6.7.1
protected function recordLastTransactionID() { $reply = $this->getLastReply(); if (empty($reply)) { $this->last_smtp_transaction_id = null; } else { $this->last_smtp_transaction_id = false; foreach ($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) { $matches = []; if (preg_match($smtp_transaction_id_pattern, $reply, $matches)) { $this->last_smtp_transaction_id = trim($matches[1]); break; } } } return $this->last_smtp_transaction_id; }