Mail

Address

Remove description/name:

import javax.mail.internet.InternetAddress;
final InternetAddress internetAddress
    = new InternetAddress("Patrick Kimber <me@mycompany.com>");
final String result = internetAddress.getAddress();
assertEquals("me@mycompany.com", result);

Sample

Client

DNS

SMTP

  • MailHostsLookup.java:

    ../../misc/howto/java/MailHostsLookup.java
    

    List MX (Mail Exchange) servers for a domain, using a DNS (Domain Name System) lookup. Copy of code written by Shayne Steele