Package netscape.net.smtp
Class SmtpClient
java.lang.Object
netscape.net.NetworkClient
netscape.net.TransferProtocolClient
netscape.net.smtp.SmtpClient
This class implements the SMTP client.
You can send a piece of mail by creating a new SmtpClient, calling
the "to" method to add destinations, calling "from" to name the
sender, calling startMessage to return a stream to which you write
the message (with RFC733 headers) and then you finally close the Smtp
Client.
- Version:
- 1.17, 12 Dec 1994
- Author:
- James Gosling
-
Field Summary
Fields inherited from class netscape.net.TransferProtocolClient
lastReplyCode, serverResponse
Fields inherited from class netscape.net.NetworkClient
serverInput, serverOutput, serverSocket
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an uninitialized SMTP client.SmtpClient
(String host) New SMTP client connected to host host. -
Method Summary
Modifier and TypeMethodDescriptionvoid
issue the QUIT command to the SMTP server and close the connection.void
void
Methods inherited from class netscape.net.TransferProtocolClient
getResponseString, getResponseStrings, readServerResponse, sendServer
Methods inherited from class netscape.net.NetworkClient
doConnect, openServer, serverIsOpen
-
Constructor Details
-
SmtpClient
New SMTP client connected to host host.- Throws:
IOException
-
SmtpClient
Create an uninitialized SMTP client.- Throws:
IOException
-
-
Method Details
-
closeServer
issue the QUIT command to the SMTP server and close the connection.- Overrides:
closeServer
in classNetworkClient
- Throws:
IOException
-
to
- Throws:
IOException
-
from
- Throws:
IOException
-
startMessage
- Throws:
IOException
-