CSCI561 - Computer Networks
Using Steven's echo client as a starting point, create a client that connects to the well known
SMTP port 25 and sends an email.
See class handout and http://www.rfc-editor.org for RFC2821.
Test an SMTP server by telneting to port 25 on most any server.
telnet sunset.olemiss.edu 25
Add the socket reuse option. See p 192.
setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on));
Use the minimal set of commands in your Stallings handout to hand contruct an email.
Note that functions for the User-Mail-Agent are embedded in the DATA field and require
the xxx: format such as "To:" "Cc:" etc.
Have the client program send an email. You may want to read a text file and
write it to the SMTP server.
Regardless of how your client reads the data (email) to send, your client program must wait for,
receive, and process each reply from the SMTP server.
Once the program is working properly, use the script program
(type "man script" to see how to use it) to show your source changes,
the compiler output, and the execution of the server.