Documention for: popspec.r Created by: btiffin on: 5-May-2007 Format: text/editable Downloaded on: 30-Apr-2025 [h1 Usage document for %popspec.r [contents [numbering-on [h2 Introduction to %popspec.r [p This script is a support script for many of the **rebol.org** REBOL email handling scripts. [h2 popspec At a Glance [p This script requires some setup to be useful, and cannot be run right out of the box. It is not a standalone script at all. It is only useful in support of the (potentially incomplete) list displayed later in this document [h2 Using %popspec.r [p There are up to four changes that need to be made for this supporting **data script**. [p The **popspec** data can first of all, be specified in two forms. Either as a specification in url! format, or as a block! of port data. As mentioned in the script, the block format is a little more general as fields could be prompted for instead of hardcoded. This is of particular use for the password field. [h3 url! format [p If using the url! form, remove the commenting semi-colon and change the string to your email information. Then you will need to either move the line to after the block, or place a **comment { ... }** sequence around the block. [h3 port! block format [p If using the block format: [list [li leave **scheme** as **'pop** [li Change the **"user"** to your account username [li Change the **"pass"** to your account password [li Uncomment and change the POP server if needed. list] [p Notes: You will only need to set the POP host information if it differs from, or you have not set the information with the SET-NET utility function. [h3 Warning about passwords Saving your password as clear text is **NOT recommended**. [h3 Alternative to saving passwords [p One suggested alternative. Use a keyword such as 'ASK for the **pass:** set-word value. Then in the script that is using **popspec: load %popspec.r**, follow this load with [asis change find popspec 'ASK ask/hide "Password? " asis] [p Please note the code that is using **load %popspec.r** may use a different variable than **popspec**, use the same variable name as used for the load in the above change example. [h2 Where %popspec.r is used in the rebol.org library [table/style/border:gray+solid/att/border="2px" [row [cell/style/border:silver+thin+solid %mailautoreply.r [cell/style/* This example confirms email received from friends only. All others will be ignored. [row [cell/style/* %mailboxsave.r [cell/style/* This example reads email and appends it to a standard mailbox file (which can be read by most email apps). [row [cell/style/* %mailfriends.r [cell/style/* This example displays messages that come from friends only. All others will be ignored. [row [cell/style/* %mailping.r [cell/style/* Confirm certain email that contains a key word. [row [cell/style/* %mailsave.r [cell/style/* This example reads all email and saves it to a file. [row [cell/style/* %mailserver.r [cell/style/* As simple as a list server gets. [row [cell/style/* %maildespam.r [cell/style/* This is an example of a simple email filter that removes unwanted junk mail from your mailbox. [row [cell/style/* %mailsniff.r [cell/style/* Example of how to search all incoming email for particular keywords. [row [cell/style/* %remind.r [cell/style/* Reads a file 'data.txt' containing appointment data, and sends my cell phone a text message 5 minutes before the appointment. table] [h2 What you can learn [p At least three important learning items from this support script. [p Sample code with passwords are not usually sophisticated enough. [p The REBOL open command is **COOL**, accepting either a url! or a port spec block, among its other abilities. [p LOAD is used to return the last value from %popspec.r as part of a set-word sequence. This is worth more study as you learn REBOL. [h2 What can break [p Saving passwords in clear text is **NOT RECOMMENDED** in the long term. Used for trial and testing, maybe, but not for the long term. [p You need access to a POP server. Most if not all ISPs support this with your internet connection. If not, or if you want to to use %popspec.r to access webmail, know that some webmail accounts will require you to use the full email address as the username. In that case, you will have to use the block format in %popspec.r, as a full email address (with the @ symbol in it) as a username will confuse a url! specification. Not to worry, the block form can handle this. [h3 More warning [p Once again, saving passwords in clear text is **NOT RECOMMENDED**. [h2 Credits [table/att/border="1px" [row [cell %popspec.r [cell Original author: Carl Sassenrath table] [list [li The rebol.org Library Team [li Usage document by Brian Tiffin, Library Team Apprentice, [date list]