WordPress at a glance
function is not described


SMTP::recordLastTransactionID() protected WP 1.0

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.

{} It's a method of the class: SMTP{}

No Hooks.


true|false|String|null. Nothing.


// protected - for code of main (parent) or child class
$result = $this->recordLastTransactionID();

Code of SMTP::recordLastTransactionID() WP 5.7.2

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]);

    return $this->last_smtp_transaction_id;