home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Komunik / sambar / sambar51p.exe / sysadmin / control / pop3mail / pop3retr.asp < prev    next >
Encoding:
Text File  |  2001-07-17  |  1.4 KB  |  50 lines

  1. <HTML>
  2. <HEAD><TITLE>Sambar Server POP3Mail</TITLE>
  3. <% 
  4. #include "../header.asp"
  5. #include "../menu.asp"
  6. area = "inbox";
  7. #include "submenu.asp"
  8.  
  9. server = getParameter($params, "server");
  10. username = getParameter($params, "username");
  11. password = getParameter($params, "password");
  12. msgno = (int)getParameter($params, "msgno");
  13. start = (int)getParameter($params, "start");
  14. stop = (int)getParameter($params, "stop");
  15.  
  16. pop3 = POP3Connect(server, username, decrypt(password));
  17. stat = POP3Stat(pop3);
  18. messages = stat[0];
  19. size = stat[1];
  20. if (stop > messages)
  21.     stop = messages;
  22.  
  23. printf("<BR><center><table border=0 cellpadding=0><tr><td>\n");
  24. printf("<B>%s@%s</B><BR>\n", username, server);
  25. printf("<FONT SIZE=-1 color=#0000ff>Message %d</FONT><BR>\n", msgno);
  26.  
  27. msg = POP3Message(pop3, msgno);
  28. msgno = msg[0];
  29. size = msg[1];
  30. to = msg[2];
  31. from = msg[3];
  32. subj = msg[4];
  33. date = msg[5];
  34.  
  35. printf("<TABLE border=0 bgcolor=#DDDD00>\n");
  36. printf("<TR><TD><B>From</B></TD><TD>%s</TD></TR>", from);
  37. printf("<TR><TD><B>To</B></TD><TD>%s</TD></TR>", to);
  38. printf("<TR><TD><B>Date</B></TD><TD>%s</TD></TR>", date);
  39. printf("<TR><TD><B>Subject</B>   </TD><TD>%s</TD></TR>", subj);
  40. printf("</TABLE><BR><PRE>\n");
  41.  
  42. write(POP3Retrieve(pop3, msgno, 999, 99999));
  43. POP3Disconnect(pop3);
  44.  
  45. printf("</PRE></table></center>\n");
  46.  
  47. #include "../footer.asp"
  48. %>
  49. </BODY></HTML>
  50.