Class com.tdac.mail.SMTPConnection
All Packages Class Hierarchy This Package Previous Next Index
Class com.tdac.mail.SMTPConnection
java.lang.Object
|
+----com.tdac.mail.SocketConnection
|
+----com.tdac.mail.SMTPConnection
- public class SMTPConnection
- extends SocketConnection
This class is used to connect to an SMTP server to send mail
- Version:
- 1.0, 11/19/96
- Author:
- Timothy D. A. Cox
-
SMTPConnection()
-
-
connect(String)
- Connect to a server on port 25 (SMTP).
-
login(String, String)
- noop
-
logout()
- noop
-
sendMessage(String, String, String, String, String)
- Send a message thru an SMTP server by issuing a 'HELO' command
SMTPConnection
public SMTPConnection()
connect
public synchronized String connect(String server) throws ExceptionMailConnection
- Connect to a server on port 25 (SMTP). Will setup the private
stream objects and read the mail server greeting.
- Parameters:
- server - the mail server name (eg. mail.domain.com)
- Returns:
- the mail server greeting string
sendMessage
public void sendMessage(String hostname,
String mailTo,
String from,
String subject,
String data) throws InternalException
- Send a message thru an SMTP server by issuing a 'HELO' command
- Parameters:
- hostname - the SMTP server name
- mailTo - the userid to recieve the mail
- from - the userid of the sender
- subject - message subject
- data - message contents
login
public void login(String userid,
String password) throws ExceptionMailConnection
- noop
logout
public void logout() throws ExceptionMailConnection
- noop
All Packages Class Hierarchy This Package Previous Next Index