Home
 

public class Client2

public class .Client2

Contains Main

Public Methods

[more]static void main(String[] argv)
Main for a very simple SMTP client



Documentation

Contains Main. This is my solution of program assignment #2. The documentation can be found at http://www.rblasch.org/study/cs629/pa2/.
ostatic void main(String[] argv)
Main for a very simple SMTP client.

Usage is: java Client2 <server_name> <server_port> <message sender> <Message receiver> <message>

server_name
Name of the host where the SMTP server is running.
server_port
Port number of the SMTP server (25).
message_sender
email address of mail sender
message_receiver
email address of mail receiver
message
The message to send.

The debugFlag of the SmtpMail class is turned on.

Sample in/output (with debug info)

alpha 103% java Client2 conductor.cs.bgsu.edu 25 'rblasch@cs.bgsu.edu' 'rblasch@cs.bgsu.edu' "MFG to me!"
D:trying to connect to server
D:connected
D:response: 220 conductor.cs.bgsu.edu ESMTP Sendmail 8.9.1/8.9.1; Sun, 3 Oct 1999 01:50:33 -0400 (EDT)
D:sending command: HELO alpha.bgsu.edu
D:response: 250 conductor.cs.bgsu.edu Hello alpha.bgsu.edu [129.1.2.12], pleased to meet you
D:sending command: MAIL from: rblasch@cs.bgsu.edu
D:response: 250 rblasch@cs.bgsu.edu... Sender ok
D:sending command: RCPT to: D:response: 250 ... Recipient ok
D:sending command: DATA
D:response: 354 Enter mail, end with "." on a line by itself
D:MFG to me!
D:.
D:response: 250 BAA23326 Message accepted for delivery
D:sending command: QUIT
D:response: 221 conductor.cs.bgsu.edu closing connection


Author:
Ronald Blaschke <rblasch@cs.bgsu.edu>
Version:
1.0

This class has no child classes.
Author:
Ronald Blaschke <rblasch@cs.bgsu.edu>
Version:
1.0

Alphabetic index HTML hierarchy of classes or Java



DOC++