Package mireka.smtp.client
Class MtaAddress
- Object
-
- mireka.smtp.client.MtaAddress
-
@Immutable public class MtaAddress extends ObjectMtaAddress contains all informations which are necessary to contact that MTA and identify it in DSN reports, logs.
-
-
Constructor Summary
Constructors Constructor Description MtaAddress(String dnsName, java.net.InetAddress address)Constructs a new MtaAddress with the default port, which is 25.MtaAddress(String smtpFormattedHost, java.net.InetAddress address, int port)MtaAddress(org.xbill.DNS.Name dnsName, java.net.InetAddress address)Constructs a new MtaAddress with the default port, which is 25.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()StringtoString()Prints the address in a compact form for informational purposes.
-
-
-
Field Detail
-
dnsName
public final String dnsName
The host name as an RFC-5321 domain name or address-literal. It comes from the content of a DNS MX record or an email address with a literal address part, or a smart host or back-end server name. For example:- mail.example.com
- [192.0.2.0]
- [IPv6:::1]
-
address
public final java.net.InetAddress address
IP address of MTA. It is possible that a domain name in an MX records have multiple A records, therefore a single domain name may refer to multiple MTA servers, and only this address differentiates between them.
-
port
public final int port
-
-
Constructor Detail
-
MtaAddress
public MtaAddress(String smtpFormattedHost, java.net.InetAddress address, int port)- Parameters:
smtpFormattedHost- The host name as an RFC-5321 domain name or address-literal. It comes from the content of a DNS MX record or an email address with a literal address part, or a smart host or back-end server name. For example:- mail.example.com
- [192.0.2.0]
- [IPv6:::1]
address- IP address of the MTAport- port of the remote MTA
-
MtaAddress
public MtaAddress(String dnsName, java.net.InetAddress address)Constructs a new MtaAddress with the default port, which is 25. This is the equivalent of callingMtaAddress(String, InetAddress, int)with port 25.
-
MtaAddress
public MtaAddress(org.xbill.DNS.Name dnsName, java.net.InetAddress address)Constructs a new MtaAddress with the default port, which is 25. This is the equivalent of callingMtaAddress(String, InetAddress, int)with port 25, and with a dnsName converted from the supplied DnsJava Name object by removing the last dot. The trailing dot marks an absolute domain name in DNS - but that syntax is invalid in SMTP.
-
-