类 javax.mail.Transport
的使用

使用 Transport 的软件包
com.sun.mail.smtp An SMTP protocol provider for the JavaMail API that provides access to an SMTP server. 
javax.mail The JavaMailTM API provides classes that model a mail system. 
javax.mail.event Listeners and events for the JavaMail API. 
 

com.sun.mail.smtpTransport 的使用
 

com.sun.mail.smtpTransport 的子类
 class SMTPSSLTransport
          This class implements the Transport abstract class using SMTP over SSL for message submission and transport.
 class SMTPTransport
          This class implements the Transport abstract class using SMTP for message submission and transport.
 

javax.mailTransport 的使用
 

返回 Transportjavax.mail 中的方法
 Transport Session.getTransport()
          Get a Transport object that implements this user's desired Transport protcol.
 Transport Session.getTransport(Address address)
          Get a Transport object that can transport a Message to the specified address type.
 Transport Session.getTransport(Provider provider)
          Get an instance of the transport specified in the Provider.
 Transport Session.getTransport(String protocol)
          Get a Transport object that implements the specified protocol.
 Transport Session.getTransport(URLName url)
          Get a Transport object for the given URLName.
 

javax.mail.eventTransport 的使用
 

参数类型为 Transportjavax.mail.event 中的构造方法
TransportEvent(Transport transport, int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)
          Constructor.
 



Copyright © 2013. All Rights Reserved.