Represents details about the sender of an email during the SMTP transaction.

This interface includes metadata about the sender's connection, such as the originating IP address, reverse DNS, HELO/EHLO value, TLS status, and authentication details (if applicable).

Sender

0.0.1

interface Sender {
    authenticated?: { method: string; username?: string };
    helo?: string;
    ip: string;
    rDNS?: string;
    tls: boolean;
}

Properties

authenticated?: { method: string; username?: string }

Authentication details if the sender authenticated.

This property exists only if the sender used SMTP authentication.

{ method: "PLAIN", username: "user@example.com" }

0.0.1

helo?: string

The HELO/EHLO value provided by the SMTP client.

This is the argument sent by the client in the EHLO or HELO command. It is typically a hostname but may also be an IP address. If the value is an IP address, it is enclosed in square brackets.

"mail.example.com"
"[192.168.1.100]"
"[IPv6:2001:db8::1]"

0.0.1

ip: string

The IP address of the sender.

This is the IP address of the SMTP client that initiated the connection.

"192.168.1.100"
"2001:db8::1"

0.0.1

rDNS?: string

The reverse DNS (rDNS) hostname of the sender.

If available, this represents the resolved hostname of the sender's IP. This value may be undefined if no rDNS record exists.

"mail.example.com"

0.0.1

tls: boolean

Indicates whether the connection was secured using TLS (STARTTLS).

A true value means that the SMTP session was encrypted using TLS (STARTTLS).

true
false

0.0.1