ailer->quit or die "mail sending failure"; b. SMTP Server implementation using Net::SMTP::Server # SMTP Server # # Include libraries use Carp; use Net::SMTP::Server; use Net ::SMTP::Server::Client; use Net: : SMTP::Server::Relay # Create a Net : SMTP: : Server object $receiver = new Net: : SMTP: : Server ( localhost', 25) ; # Specify address and port for running the Server # SMTP commands can now be accessed with "receiver" object # Accept Connection from Client while ($conn = $receiver->accept ) { # Handle the client's connection my $sender = new Net: : SMTP: : Server: : Client ($conn) # A better option is to spawn off a new parser for handling the client # This can be implemented as a new thread or using fork ( ) # Process the client. . $sender->process next; # This will ensure that the connecting client completes the SMTP transaction. Mail Communication # Relaying everything to a server my $relay = new Net : : SMTP : : Server : : Relay ($sender > {FROM}, $sender - > {TO} $sender - > {MSG} ) ; # In an ideal implementation the mails needs to be stored in the server # Storage ensures that mails can be accessed later using an access protocol 29.7 Conclusion The intent of this chapter is to introduce the reader to the basic concepts of mail communication. The chapter started with a basic overview of mail messaging and mail delivery process. Then some of the mail protocols for data transfer and access were discussed. MIME, which is an important concept in mail delivery, was also handled. The chapter concludes with an implementation example of SMTP server and client using the Perl programming language. Event handling is an essential activity in operation support solution and mail communication is a way of notify- ing operators and business managers on critical events. Additional Reading 1. Pete Loshin. TCP/IP Clearly Explained. 4th ed. San Francisco, CA: Morgan Kaufmann, 2003. 2. John Rhoton. Programmer's Guide to Internet Mail: SMTP, POP, IMAP, and LDAP. Florida: Digital Press, 1999. 3. Rod Scrimger, Paul LaSalle, M