Tuesday, October 22, 2002 08:31 AM
All the API gives you (the client) is some pre-packaged ways to invoke most (but not all) of the commands in the SMTP protocol (for sending), and the POP or IMAP protocols (for reading).
If you are going to implement the thing or things that sit at the other end of the protocol conversation, accepts the protocol commands and securely, reliably performs the actions required (a server that sends and receives messages, and a server that stores, manages, and provides access to stored messages and folders, etc.), I wish you good luck, and I suggest you study the existing examples, and maybe in a year or two you might be ready to think about what kind of code you ought to write yourself :-)
The Internet Mail Consortium (http://www.imc.org) has good references to start you out. For SMTP servers, you would want to download the source code for Sendmail (http://www.sendmail.org), QMail (http://www.qmail.org), maybe a few others. For IMAP/POP servers, look at http://www.imap.org.