Java org.apache.commons.net.smtp SMTPClient fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.net.smtp SMTPClient fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.net.smtp SMTPClient.

The text is from its open source code.

Constructor

SMTPClient()
Default SMTPClient constructor.
SMTPClient(String encoding)
Overloaded constructor that takes an encoding specification

Method

voidaddProtocolCommandListener(ProtocolCommandListener listener)
Adds a ProtocolCommandListener.
booleanaddRecipient(RelayPath path)
Add a recipient for a message using the SMTP RCPT command, specifying a forward relay path.
booleanaddRecipient(String address)
Add a recipient for a message using the SMTP RCPT command, the recipient's email address.
booleancompletePendingCommand()
At least one SMTPClient method ( #sendMessageData sendMessageData ) does not complete the entire sequence of SMTP commands to complete a transaction.
voidconnect(InetAddress host)
Opens a Socket connected to a remote host at the current default port and originating from the current host at a system assigned port.
voidconnect(InetAddress host, int port)
Opens a Socket connected to a remote host at the specified port and originating from the current host at a system assigned port.
voiddisconnect()
Closes the connection to the SMTP server and sets to null some internal data so that the memory may be reclaimed by the garbage collector.
intgetReply()
Fetches a reply from the SMTP server and returns the integer reply code.
intgetReplyCode()
Returns the integer value of the reply code of the last SMTP reply.
StringgetReplyString()
Returns the entire text of the last SMTP server response exactly as it was received, including all end of line markers in NETASCII format.
String[]getReplyStrings()
Returns the lines of text from the last SMTP server response as an array of strings, one entry per line.
inthelo(String hostname)
A convenience method to send the SMTP HELO command to the server, receive the reply, and return the reply code.
booleanisConnected()
Returns true if the client is currently connected to a server.
booleanlogin()
Login to the SMTP server by sending the HELO command with the client hostname as an argument.
booleanlogin(String hostname)
Login to the SMTP server by sending the HELO command with the given hostname as an argument.
booleanlogout()
Logout of the SMTP server by sending the QUIT command.
intmail(String reversePath)
A convenience method to send the SMTP MAIL command to the server, receive the reply, and return the reply code.
intnoop()
A convenience method to send the SMTP NOOP command to the server, receive the reply, and return the reply code.
intquit()
A convenience method to send the SMTP QUIT command to the server, receive the reply, and return the reply code.
intrcpt(String forwardPath)
A convenience method to send the SMTP RCPT command to the server, receive the reply, and return the reply code.
booleanreset()
Aborts the current mail transaction, resetting all server stored sender, recipient, and mail data, cleaing all buffers and tables.
intsendCommand(String command)
Sends an SMTP command with no arguments to the server, waits for a reply and returns the numerical response code.
intsendCommand(String command, String args)
Sends an SMTP command to the server, waits for a reply and returns the numerical response code.
WritersendMessageData()
Send the SMTP DATA command in preparation to send an email message.
booleansendNoOp()
Sends a NOOP command to the SMTP server.
booleansendShortMessageData(String message)
A convenience method for sending short messages.
booleansendSimpleMessage(String sender, String recipient, String message)
A convenience method for a sending short email without having to explicitly set the sender and recipient(s).
booleansendSimpleMessage(String sender, String[] recipients, String message)
A convenience method for a sending short email without having to explicitly set the sender and recipient(s).
voidsetConnectTimeout(int connectTimeout)
Sets the connection timeout in milliseconds, which will be passed to the Socket object's connect() method.
voidsetDefaultTimeout(int timeout)
Set the default timeout in milliseconds to use when opening a socket.
booleansetSender(RelayPath path)
Set the sender of a message using the SMTP MAIL command, specifying a reverse relay path.
booleansetSender(String address)
Set the sender of a message using the SMTP MAIL command, specifying the sender's email address.
voidsetSoTimeout(int timeout)
Set the timeout in milliseconds of a currently open connection.
voidsetTcpNoDelay(boolean on)
Enables or disables the Nagle's algorithm (TCP_NODELAY) on the currently opened socket.