First, we will write an SMTP server that listens on a particular host and a particular port. Then we will write an SMTP client that connects to the same host and port, with the fromaddress, toaddress, subject, and message passed as the other arguments.