org.sf.cafebabe.util
Class SMTPClient
java.lang.Object
org.sf.net.AbstractClient
org.sf.cafebabe.util.SMTPClient
- All Implemented Interfaces:
- java.io.Serializable, org.sf.net.Client
public class SMTPClient
- extends org.sf.net.AbstractClient
- See Also:
- Serialized Form
Field Summary |
(package private) static short |
DEFAULT_PORT
|
(package private) static java.lang.String |
EOL
|
protected java.io.DataInputStream |
in
|
protected java.io.PrintStream |
out
|
protected java.net.Socket |
socket
|
Fields inherited from class org.sf.net.AbstractClient |
logger |
Constructor Summary |
SMTPClient(java.lang.String host)
|
Methods inherited from class org.sf.net.AbstractClient |
getLogger, pipe, setLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EOL
static final java.lang.String EOL
- See Also:
- Constant Field Values
DEFAULT_PORT
static final short DEFAULT_PORT
- See Also:
- Constant Field Values
socket
protected java.net.Socket socket
in
protected java.io.DataInputStream in
out
protected java.io.PrintStream out
SMTPClient
public SMTPClient(java.lang.String host)
writeRequest
public void writeRequest(java.lang.Object request)
throws java.io.IOException
- Throws:
java.io.IOException
readResponse
public java.lang.Object readResponse()
throws java.io.IOException
- Throws:
java.io.IOException
connect
public void connect()
throws java.io.IOException
- Throws:
java.io.IOException
disconnect
protected void disconnect()
throws java.io.IOException
- Disconnection from the server.
- Throws:
java.io.IOException
- if an I/O error occurs.
setHeloHost
public void setHeloHost(java.lang.String helohost)
setSender
public void setSender(java.lang.String sender)
setReceiver
public void setReceiver(java.lang.String receiver)
setSubject
public void setSubject(java.lang.String subject)
setBody
public void setBody(java.lang.String body)
interact
public void interact()
throws java.io.IOException
- Throws:
java.io.IOException
stepProtocol
void stepProtocol(java.lang.String expected,
java.lang.String say)
throws java.io.IOException
- Throws:
java.io.IOException
missLine
void missLine(java.lang.String expected)
throws java.io.IOException
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
Copyright 2006 Dream Programs Inc.. All Rights Reserved.