gnu.mail.providers.smtp

Class SMTPTransport

public class SMTPTransport extends Transport

This transport handles communications with an SMTP server.

Version: 2.0

Author: Andrew Selkirk Ben Speakmon Chris Burdess

Field Summary
protected SMTPConnectionconnection
The connection used to communicate with the server.
protected StringlocalHostName
Constructor Summary
SMTPTransport(Session session, URLName urlName)
Creates a new SMTPTransport instance.
Method Summary
voidclose()
Close this transport.
StringgetGreeting()
Returns the greeting banner.
protected booleanprotocolConnect(String host, int port, String username, String password)
Connects to the SMTP server.
voidsendMessage(Message message, Address[] addresses)
Send the specified message to the server.

Field Detail

connection

protected SMTPConnection connection
The connection used to communicate with the server.

localHostName

protected String localHostName

Constructor Detail

SMTPTransport

public SMTPTransport(Session session, URLName urlName)
Creates a new SMTPTransport instance.

Parameters: session a Session value urlName an URLName value

Method Detail

close

public void close()
Close this transport.

getGreeting

public String getGreeting()
Returns the greeting banner.

protocolConnect

protected boolean protocolConnect(String host, int port, String username, String password)
Connects to the SMTP server.

sendMessage

public void sendMessage(Message message, Address[] addresses)
Send the specified message to the server.
©