|
void
|
checkConnected()
Check if we're in the connected state.
|
|
synchronized
void
|
close()
Close the Transport and terminate the connection to the server.
|
|
synchronized
void
|
connect(Socket socket)
Start the SMTP protocol on the given socket, which was already
connected by the caller.
|
|
OutputStream
|
data()
Send the DATA command to the SMTP host and return
an OutputStream to which the data is to be written.
|
|
boolean
|
ehlo(String domain)
Issue the EHLO command.
|
|
void
|
finalize()
Stop the event dispatcher thread so the queue can be garbage collected.
|
|
void
|
finishData()
Terminate the sent data.
|
|
synchronized
String
|
getAuthorizationId()
Gets the authorization ID to be used for authentication.
|
|
String
|
getExtensionParameter(String ext)
Return the parameter the server provided for the specified
service extension, or null if the extension isn't supported.
|
|
synchronized
int
|
getLastReturnCode()
Return the return code from the last response we got from the server.
|
|
synchronized
String
|
getLastServerResponse()
Return the last response we got from the server.
|
|
synchronized
String
|
getLocalHost()
Get the name of the local host, for use in the EHLO and HELO commands.
|
|
synchronized
String
|
getNTLMDomain()
Gets the NTLM domain to be used for NTLM authentication.
|
|
synchronized
boolean
|
getNoopStrict()
Is the NOOP command required to return a response code
of 250 to indicate success?
|
|
synchronized
boolean
|
getReportSuccess()
Should we report even successful sends by throwing an exception?
If so, a SendFailedException will always be thrown and
an com.sun.mail.smtp.SMTPAddressSucceededException
SMTPAddressSucceededException will be included in the exception
chain for each successful address, along with the usual
com.sun.mail.smtp.SMTPAddressFailedException
SMTPAddressFailedException for each unsuccessful address.
|
|
synchronized
boolean
|
getRequireStartTLS()
Should we require the STARTTLS command to secure the connection?
|
|
synchronized
boolean
|
getSASLEnabled()
Is SASL authentication enabled?
|
|
synchronized
String[]
|
getSASLMechanisms()
Get the list of SASL mechanisms to consider if SASL authentication
is enabled.
|
|
synchronized
String
|
getSASLRealm()
Gets the SASL realm to be used for DIGEST-MD5 authentication.
|
|
synchronized
boolean
|
getStartTLS()
Should we use the STARTTLS command to secure the connection
if the server supports it?
|
|
synchronized
boolean
|
getUseRset()
Should we use the RSET command instead of the NOOP command
in the @{link #isConnected isConnected} method?
|
|
void
|
helo(String domain)
Issue the HELO command.
|
|
synchronized
boolean
|
isConnected()
Check whether the transport is connected.
|
|
synchronized
void
|
issueCommand(String cmd, int expect)
Send the command to the server.
|
|
void
|
mailFrom()
Issue the MAIL FROM: command to start sending a message.
|
|
void
|
notifyTransportListeners(int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)
Notify all TransportListeners.
|
|
boolean
|
protocolConnect(String host, int port, String user, String passwd)
Performs the actual protocol-specific connection attempt.
|
|
void
|
rcptTo()
Sends each address to the SMTP host using the RCPT TO:
command and copies the address either into
the validSentAddr or invalidAddr arrays.
|
|
int
|
readServerResponse()
Reads server reponse returning the returnCode
as the number.
|
|
boolean
|
sasllogin(String[] allowed, String realm, String authzid, String u, String p)
SASL-based login.
|
|
void
|
sendCommand(String cmd)
Sends command cmd to the server terminating
it with CRLF.
|
|
synchronized
void
|
sendMessage(Message message, Address[] addresses)
Send the Message to the specified list of addresses.
|
|
synchronized
void
|
setAuthorizationID(String authzid)
Sets the authorization ID to be used for authentication.
|
|
synchronized
void
|
setLocalHost(String localhost)
Set the name of the local host, for use in the EHLO and HELO commands.
|
|
synchronized
void
|
setNTLMDomain(String ntlmDomain)
Sets the NTLM domain to be used for NTLM authentication.
|
|
synchronized
void
|
setNoopStrict(boolean noopStrict)
Set whether the NOOP command is required to return a response code
of 250 to indicate success.
|
|
synchronized
void
|
setReportSuccess(boolean reportSuccess)
Set whether successful sends should be reported by throwing
an exception.
|
|
synchronized
void
|
setRequireStartTLS(boolean requireStartTLS)
Set whether the STARTTLS command should be required.
|
|
synchronized
void
|
setSASLEnabled(boolean enableSASL)
Set whether SASL authentication is enabled.
|
|
synchronized
void
|
setSASLMechanisms(String[] mechanisms)
Set the list of SASL mechanisms to consider if SASL authentication
is enabled.
|
|
synchronized
void
|
setSASLRealm(String saslRealm)
Sets the SASL realm to be used for DIGEST-MD5 authentication.
|
|
synchronized
void
|
setStartTLS(boolean useStartTLS)
Set whether the STARTTLS command should be used.
|
|
synchronized
void
|
setUseRset(boolean useRset)
Set whether the RSET command should be used instead of the
NOOP command in the @{link #isConnected isConnected} method.
|
|
synchronized
int
|
simpleCommand(String cmd)
Send the command to the server and return the response code
from the server.
|
|
int
|
simpleCommand(byte[] cmd)
Send the command to the server and return the response code
from the server.
|
|
void
|
startTLS()
Issue the STARTTLS command and switch the socket to
TLS mode if it succeeds.
|
|
boolean
|
supportsAuthentication(String auth)
Does the server we're connected to support the specified
authentication mechanism? Uses the extension information
returned by the server from the EHLO command.
|
|
boolean
|
supportsExtension(String ext)
Return true if the SMTP server supports the specified service
extension.
|
|
static
String
|
xtext(String s)
Convert a string to RFC 1891 xtext format.
|