Holds extra information about a parsed Received header part, for FROM and BY parts, namely: ehlo name, hostname, and address.
The parsed parts would be mapped as follows:
FROM ehlo name (hostname [address]), for example: FROM computer (domain.com [1.2.3.4]) would contain "computer" for getEhloName(), domain.com for getHostname and 1.2.3.4 for getAddress().
This doesn't change if the ehlo name is an address, it is still returned in getEhloName(), and not in getAddress(). Additionally square brackets are not stripped from getEhloName() if its an address. For example: "FROM [1.2.3.4]" would return "[1.2.3.4]" in a call to getEhloName().
For further information on how the header's parsed, check the documentation for {@see \ZBateson\MailMimeParser\Header\Consumer\Received\DomainConsumer}.
- author Zaahid Bateson
Methods |
public __construct(Psr\Log\LoggerInterface $logger, ZBateson
|
public getAddress() : ?string Returns the address of the server, or whatever string that looks like an address in the address position when parsing (but never a hostname). |
public getEhloName() : ?string Returns the name used to identify the server in the first part of the extended-domain line. Note that this is not necessarily the name used in the EHLO line to an SMTP server, since implementations differ so much, not much can be guaranteed except the position it was parsed in. |
public getHostname() : ?string Returns the hostname of the server, or whatever string in the hostname position when parsing (but never an address). |
Properties |
protected ?string $address = NULL
|
protected ?string $ehloName = NULL
|
protected ?string $hostname = NULL
|
Methods |