Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

19. The JavaMail API > 19.5. Addresses

Addresses

The javax.mail.Address class is very simple. It’s an abstract class that exists mainly to be subclassed by other, protocol-specific address classes:

public abstract class Address extends Object

There are two of these subclasses in the standard JavaMail API: InternetAddress for SMTP email and NewsAddress for Usenet newsgroups:

public class InternetAddress extends Address
public class NewsAddress extends Address

Providers of other mail protocols would also subclass Address with classes that represented their style of address.

The Address Class

The Address class itself is extremely simple. It has only three methods, all abstract, two of which are simple utility methods that override the corresponding methods in


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial