|
||||||||||
Download
IntroductionThis sample uses a webmail system to demonstrate how to use the Internet Mail Client Control Library on your ISS/ASP site. Using this sample you can:
The Webmail sample may provide a useful starting point for your own application but it's not a complete solution - in particular you should consider the following points -
Files in the webmail sampleFigure 1 shows the relationship between the asp files in this distribution. wms_login.aspPresents the user with a simple HTML form to provide the details needed by the webmail sample. Note In a production system you'd be more likely to store the user's POP3 and SMTP details locally and have a site specific login. wms_inbox.aspConnects to the POP3 server, gets the message headers and presents the user with a list of messages in the maildrop. This page uses POP3TOP rather than RetrieveMessages so that only the message headers are retrieved. Note The sample does not sort the messages in the inbox - they are presented in the same order as the POP3 server returns them, in a production system your users may well expect to be able to sort the messages by Sender, Subject or Date. wms_readmail.aspDisplays the message text and a list of attachments. Note Only the text/plain sections of the emails are displayed. You will need to decide which textual parts of the email are displayed. Showing text/html sections is tempting but you need to consider if a sender could post malicious HTML and compromise the security of the system. Advanced application may also wish to take into consideration the semantics of the various multipart/* content types. wms_deletemail.aspDeletes a message from the maildrop, redirects the user back to wms_inbox.asp. This sample does not present the user with an opportunity to confirm or cancel the deletion. wms_compose.aspAllows the user to compose an email. Note It would be cool to allow the user to attach files to the email. wms_sendmail.aspSends a message to the SMTP server, redirects the user back to wms_inbox.asp. This sample does not present the user with an opportunity to confirm or cancel the sending of the email. wms_logout.aspClears the IIS session and redirects the user back to wms_login.asp. |
||||||||||
|