@database MailCheck
@master Data:RobsProjects/MailCheck/MailCheck.guide
@$VER: MailCheck V1.2
@remark What are you doing in my guide - get out!

@node "Main" "Main"


                           @{fg shine}MailCheck Version 1.2@{fg text}                            


              Automated e-mail retrieval with @{"Miami" system "run <>nil: SYS:Utilities/MultiView Miami:Miami.guide"} and @{"YAM" system "run <>nil: SYS:Utilities/Multiview YAM:YAM.guide"}

                        
                                    by


                              @{"Robert Wilson" link "Contact" 0}



 ---------------------------------------------------------------------------



                 @{"  " link "Disclaimer" 0} Disclaimer          @{"  " link "My Suggestions" 0} My Configuration     

                 @{"  " link "Copyright" 0} Copyright           @{"  " link "Your Suggestions" 0} Suggestions..?   

                 @{"  " link "Requirements" 0} Requirements        @{"  " link "History" 0} History         

                 @{"  " link "Introduction" 0} Introduction        @{"  " link "The Future" 0} The Future                 

                 @{"  " link "Features" 0} Features            @{"  " link "Bugs" 0} Bugs

                 @{"  " link "Installation" 0} Installation        @{"  " link "RelatedSoftware" 0} Related Software  

                 @{"  " link "TheScripts" 0} The Scripts         @{"  " link "Other Things" 0} Other Things          

                 @{"  " link "Configuration" 0} Configuration       @{"  " link "Contact" 0} Contact 
            


 ---------------------------------------------------------------------------

                            © 1997 DCS Software

@endnode

@node "Disclaimer" "Disclaimer"
 

                                @{fg shine}Disclaimer
                                ~~~~~~~~~~@{fg text}
                                


 MailCheck was originally written for my own use.

 I have been using MailCheck for several months (in one form or another) and
 have never experienced any problems with it.

 I will not take responsibility in any way if MailCheck or any of the
 associated scripts fail and subsequently leave your modem on-line, trash
 your hard drive or blow up your monitor!
  

                    USE THESE SCRIPTS AT YOUR OWN RISK!

@endnode

@node "Copyright" "Copyright"


                                 @{fg shine}Copyright
                                 ~~~~~~~~~@{fg text}



 MailCheck is released as Freeware.

 You may distribute it though out the Amiga community as long as the
 following conditions are maintained:

  * You do not try to take credit for my work. 

  * You do not sell it for profit. 

  * Before including it on a compilation disk or CD you must ask me first.

  * All the files must be kept together in a single folder named MailCheck.
    These files being...

      MailCheck
        GetMCFiles.rexx
        Install
        Install.info
        LastCheck      
        Mail2RW.rexx
        MailCheck
        MailCheck.guide
        MailCheck.guide.info
        MailCheck.rexx
        ReadMe1st
        ReadMe1st.info
        SampleCheck
        Samples.info
        Samples
          you_have_a_mailmessage.wav 


                       MailCheck © 1997 DCS Software


@endnode

@node "Requirements" "Requirements"


                               @{fg shine}Requirements
                               ~~~~~~~~~~~~@{fg text}



 Amiga             -     Funny that! 

 YAM               -     Amiga mailer by Marcel Beck.
 Miami             -     TCP/IP stack by Holger Kruse.
 RexxMast          -     ARexx server

 CheckModem        -     Modem status tester by Nils Görs.
 Play16            -     Sample player by Thomas Wenzel.
 OkayDokey         -     Requester auto closer by Paul Huxham.


 All the programs required are available on the Aminet. 

 I would assume that you are already using Miami and YAM - if not then why
 did you download MailCheck?

 In order to make things as painless as possible, I have written a small
 script for YAM which could be of use? By clicking in the button below a
 request will be written to the Sunsite FTPMail server to send CheckModem,
 Play16 and OkayDokey from the main Aminet FTP site (ftp.wustl.edu) direct
 to you!

              @{"  " system "rx rexx:GetMCFiles.rexx"} <-- Click here to write a request with YAM.

 Once complete, all you need to do is send the mail. All being well the
 files will arrive, MIME encoded in your mail normally within a day.

@endnode

@node "Introduction" "Introduction"
 

                               @{fg shine}Introduction
                               ~~~~~~~~~~~~@{fg text}



 When I first got connected to the Internet, I was immediately impressed
 with the facility that e-mail gave me. I could send a message to someone on
 the other side of the world and they could reply to me all within a few
 minutes.

 Then as time went by it became so labourious having to dial up my Internet
 provider and check my mail regularly - that was if I remembered! 

 I though about this for some time and knowing that both Miami and YAM had
 an ARexx port I thought that it should be quite simple to write a script to
 do this for me. Automate the process with a scheduling program and that
 would be that.

 After several revisions and numerous connections to my Internet provider
 during testing here you have the results of my work. I hope that it suits
 your requirements? If it doesn't please tell me why?

 A big thank you goes out to the following people for their assistance with
 this project:

   Jim Hines            -   For the ARexx help and the excellent EZCron.
   
   Antonio Marriott     -   For testing my scripts.    

   Karim                -   For permission to distribute the sample.       





                     @{fg shine}Only Amiga makes it possible...?@{fg text}

@endnode

@node "Features" "Features"
 

                                 @{fg shine}Features
                                 ~~~~~~~~@{fg text}



  * MailCheck is Freeware. This is the Amiga - what did you think?
       
  * Intelligent scripting.
        
  * Easy configuration.
  
  * Pop up requester.

  * Log file of events.

  * Optional sample playing.

  * New STEP mode.
 
@endnode

@node "Installation" ""


                               @{fg shine}Installation
                               ~~~~~~~~~~~~@{fg text}
  
                              

 The installer script does not use the standard Workbench installer
 command. I have looked into this, but at the moment I do not have
 sufficient time to learn the language. I hope that future versions of
 MailCheck and some of my other projects will use installer.

 To install simply double click on the Install icon from Workbench. You
 will then be prompted for information if and when required. All user
 input is done through standard ASL requesters.

 Once installation is complete you must reset your Amiga, before attempting
 to use MailCheck.

@endnode

@node "TheScripts" "TheScripts"


                                @{fg shine}The Scripts
                                ~~~~~~~~~~~@{fg text}



 MailCheck consists of two main scripts - MailCheck (the AmigaDOS script),
 MailCheck.rexx (the ARexx script). New to version 1.2 are two additional
 AmigaDOS scripts - LastCheck and SampleCheck.

 I have only tested MailCheck with Workbench 3.1. I cannot however see any
 reason why it should not work under 2.04+ using the RequestChoice and
 RequestFile replacements. If it doesn't - let me know!

 Below are details of each scripts function and brief a description of
 operation.



  
                             @{"  " link "MailCheckDos" 0} MailCheck

  
                             @{"  " link "MailCheckRexx" 0} MailCheck.rexx


                             @{"  " link "LastCheck" 0} LastCheck


                             @{"  " link "SampleCheck" 0} SampleCheck
 
@endnode

@node "MailCheckDos" "MailCheckDos"


                                 @{fg shine}MailCheck
                                 ~~~~~~~~~@{fg text}
 


 This script can be launched from the shell simply by typing MailCheck.
 Alternative usage would be with a hot-key (defined with DOpus, Tool
 Manager or even FKey for example) or from an automatic scheduling program
 such as EZCron or Recall.

 The script checks the modem status and then launches MailCheck.rexx. Once
 the Arexx script has returned (finished) if new mail has been received the
 SampleCheck script is launched as a new process.

 Only one copy of the script can be launched at any time. Attempting to
 launch a second copy will result in the second script exiting immediately.

 New in version 1.2 is an optional STEP switch (e.g MailCheck STEP). The
 purpose of this is best explained with the example below.

 Lets say EZCron is configured to check the mail every hour (on the hour).
 If for some reason it was not possible to connect to your Internet
 provider it would then be another hour before another attempt was made.
 With the 'STEP' mode you would configure EZCron to check the mail every
 half an hour. If connection on the hour was successful, the next attempt
 (on the half hour) will be skipped and no attempt would be made until the
 next hour. If however the connection failed (on the hour) then an attempt
 will be made to check the mail on the half hour. If successful then
 checking will take place at hourly intervals from now on, on the half hour
 until this fails when checking will revert back to the hour. And so on...

 Also if the script was manually launched in between scheduled checks,
 assuming this was successful the next scheduled check would be skipped.

@endnode

@node "MailCheckRexx" "MailCheckRexx"


                              @{fg shine}MailCheck.rexx
                              ~~~~~~~~~~~~~~@{fg text}



 The script should only be launched by MailCheck. Do not attempt to launch
 this manually from the shell (e.g. rx MailCheck.rexx).

 The script checks to see if both Miami and YAM are already running. If
 they are not then they will be started automatically. The script will then
 wait for a maximum time of 30 seconds (each) for the Arexx port to appear
 before exiting. If both applications are launched successfully then Miami
 will dial your Internet provider. Once on-line YAM will check and download
 any mail after which Miami will disconnect immediately. Please note that
 if you were on-line before MailCheck was launched - you will not be
 disconnected.

 All connections are recorded in the log file (s:MailCheck.log) for future
 reference. The log file records the date/time of invocation and the amount
 of mail received or any details of error in connection.

 See the Log File Messages for further information.


                           @{"  " link "LogFileMessages" 0} Log File Messages

@endnode

@node "LogFileMessages" "LogFileMessages"


                             @{fg shine}Log File Messages
                             ~~~~~~~~~~~~~~~~~@{fg text}
 


 The first entry in the log file is always the date and time that MailCheck
 was launched. After that there will be one of the following messages...


  * "Error - Modem not ready.". The means that the modem
    was either switched of or was being used by another program.

  * "Error - YAM failed to start.". An attempt was made to start
    YAM, but after 30 seconds of waiting the ARexx port had not appeared.

  * "Error - Miami failed to start.". An attempt was made to start
    Miami, but after 30 seconds of waiting the ARexx port had not appeared.

  * "Error - Could not get Miami on-line.". Miami failed to connect to you
    Internet provider. This may be because your phone line was in use, you
    provider was engaged or a protocol could not be established.

  * "Error - Could not connect to mail server.". A successful connection was
    made to your provider, but the mail server did not respond. The server
    is probably out of action - I get this quite a bit!

  * "Connected - No new mail received.". Like it says.

  * "Connected - 1 new mail received.". Yet again, like it says.

  * "Connected - x new mails received.". Where 'x' is the quantity received.

@endnode

@node "LastCheck" "LastCheck"

                            
                                 @{fg shine}LastCheck
                                 ~~~~~~~~~@{fg text}
  


 Like MailCheck this script can be launched from the shell, with a hot-key
 or with an automatic scheduling program. The script opens a requester
 giving details of the last successful date/time of connection, the amount
 of mail received and an option to check the mail again. Selecting `Yes`
 will launch MailCheck and close the requester. Selecting `No` will simply
 close the requester.

 If MailCheck is launched whilst the LastCheck requester is visible, upon
 successful connection and subsequent disconnection from the mail server,
 the requester will automatically close (see *). Like MailCheck only one
 copy of LastCheck can be launched at any time.

 * - I have only managed to get this to work when using the WB3.+ original
 RequestChoice command. If you discover a WB2.04 compatible version with
 which this works, please let me know.

@endnode

@node "SampleCheck" "SampleCheck"


                                @{fg shine}SampleCheck
                                ~~~~~~~~~~~@{fg text}
 


 If configured to play a sample on receipt of mail this script launches
 Play16 to play the sample.

 This script is normally launched by MailCheck, but by typing SampleCheck
 in the shell it is possible to test this function.

@endnode

@node "Configuration" "Configuration"


                               @{fg shine}Configuration
                               ~~~~~~~~~~~~~@{fg text}
     


 The configuration for MailCheck is set with environmental variables. After
 installation  you  will find, appended to the bottom of you user-startup an
 entry similar to this:

 ;BEGIN MailCheck
 Assign Miami: Programs:Comms/Miami/
 SetEnv MCSerial Devs:squirrelserial.device
 SetEnv MCStep 0
 SetEnv MCPlay 1 
 SetEnv MCSample S:MCSamples/you_have_a_mailmessage.wav
 ;END MailCheck

 Here's an explanation of this entry line by line:

  * Assign Miami: <path> - If you didn't have an assign to Miami already
    then you do now!

  * SetEnv MCSerial Devs:squirrelserial.device - the name of your serial
    device. Unit 0 is always assumed, but can be changed by editing the
    MailCheck script.

  * SetEnv MCStep 0 - Only for use with the STEP switch. If you set this
    to 1 then MailCheck will skip when first launched after a reset. 

  * SetEnv MCPlay 1 - Turn sample playing on. To turn it off set this to 0.

  * SetEnv MCSample <file> - Set <file> to the path and name of your sample.

 All permanent changes must be made to your user-startup. Temporary changes
 can be made with the SetEnv command at the shell.  For example, to
 temporarily turn off sample playing you would type:

   SetEnv MCPlay 0
 
@endnode

@node "My Suggestions" "My Suggestions"


                              @{fg shine}My Suggestions
                              ~~~~~~~~~~~~~~@{fg text}
 

 
 This is how I use MailCheck. I have included this section as I thought that
 it may be of use when configuring MailCheck for your own needs.

 Both Miami and YAM are configured (in the MUI settings) to start iconified,
 with an entry in the Tools menu only. This prevents them from suddenly
 popping up when I'm working on something else.

 I have configured EZCron as follows:

  LastCheck is my startup event. This way every time I reset (or switch on)
  my Amiga I can see when my mail was last checked.

  LastCheck is also configured to run every hour between 19:00 and 24:00
  during the week. This helps to keep the phone bill down in the week.

  MailCheck is configured to run every hour (day and night) at the weekend.
  This is when I'm most likely to be at my computer. I use the STEP switch
  as the argument. With this, all being well my mail is check every 2
  hours.

 With DOpus 5.5 I have an Internet button bank where amongst everything else
 there are a couple of buttons. One to launch MailCheck and the other to
 view the log file. Also I've configured a global hot key to launch
 LastCheck.


 I hope this gives you some ideas?

@endnode

@node "Your Suggestions" "Your Suggestions"


                             @{fg shine}Your Suggestions
                             ~~~~~~~~~~~~~~~~@{fg text}
 


 I'm always looking for ideas and ways to improve my work. If you've got any
 comments, be them good or bad - let me know.


 If you have found a bug with any of the MailCheck scripts, please read the
 "Bugs" section before mailing me. 

 
 Do you have any good quality samples which are suited to MailCheck? If the
 answer to this question is "yes" then send them to me. Please note that
 you must have permission from the copyright owner, otherwise I will not be
 able to include these in any future versions.

@endnode

@node "The Future" "The Future"


                                @{fg shine}The Future
                                ~~~~~~~~~~@{fg text}
 


 There are a several improvements to MailCheck which I would find useful:


 * Option to automatically encrypt and forward incoming mail to another
   address.

 * Option to automatically reply to incoming mail (kind of like an
   answerphone) - thought this may be useful if you go away?

 * Retrieval from multiple mail boxes. 


 If you like what you see here, then let me know. Without your encouragement
 I will probably never get round to doing any of the above. 

 Further development of this project is reliant on YOU. 

@endnode

@node "History" "History"


                                 @{fg shine}History
                                 ~~~~~~~@{fg text}
 


 Version 1.0  -  Not released, my personal use only.

 Version 1.1  -  Scripts cleaned up (a bit) and quick docs written. 
                 Distribution with EZCron.

 Version 1.2 -   Scripts cleaned up - again!
                 New STEP mode.
                 Sample playing. 	 
                 Last Check script added. 
                 Install script.
                 AmigaGuide docs.
                 No longer requires 'rexxtricks.library'.
                 Uploaded to the Aminet.

@endnode

@node "Bugs" "Bugs"


                                   @{fg shine}Bugs
                                   ~~~~@{fg text}
 


 None known at the moment. If I didn't believe in my work, I would not have
 uploaded it yet!

 Even so, there may be problems...? MailCheck works for me with the
 following configuration:

 Software

  * Workbench 3.1 (40.42)
  * Miami 2.0g  
  * YAM 1.3.4 
  
 Hardware

  * A1200 (Commodore)
  * Kickstart 3.1 (40.63)
  * Blizzard A1230 IV
  * 16 MB Fast Ram
  * SurfSquirrel 
  * 33,600 'no name' DVF modem


 Before mailing me try and remove any patches or hacks that are installed
 on your Amiga. If it works now then it's not my fault!

 When submitting a bug report to me, please give a brief description of
 your Amiga configuration (similar to that above). Be sure to explain
 exactly how you are using the scripts, be it manually or with a scheduling
 program.

 I will try and answer all mails within a couple of days.
 
@endnode

@node "RelatedSoftware" "RelatedSoftware"


                             @{fg shine}Related Software
                             ~~~~~~~~~~~~~~~~@{fg text}
 


 As mentioned elsewhere in this guide there are a couple of schedulers which
 you may like to take a look at.


 EZCron by Jim Hines

  This can be found on the Aminet. I would however suggest that you visit
  the following site for the latest version.

                     http://www.iolinc.net/~hines_j


 ReCall by Ketil Hunn

  This can be found on the Aminet together with a free keyfile. No longer
  in development as far as I'm aware - I think he's now concentrating on
  Win95 projects. 

  One of these Win95 projects is NewMail, which I just can't get to work -
  I did mail Ketil about this, but he wasn't very helpful! 

  The are some free samples on this page intended for use with NewMail, but
  they are also ideal for use with MailCheck.

                    http://www.sis.pitt.edu/~ketil/

@endnode

@node "Other Things" "Other Things"


                               @{fg shine}Other Things
                               ~~~~~~~~~~~~@{fg text}
 


 MailCheck is my second release to the Amiga community.

 My other release is an AmigaDos and Arexx script for Directory Opus 5,
 called 'DOpus Double Click'. The purpose of this is so you can type DDC
 <filename> at the shell and simulate double clicking on a file in the
 DOpus lister.

 Excellent for use with YAM - see the DDC docs for more information.

 DOpus Double Click is available from the Aminet (biz/dopus) or if you'd
 prefer you can mail me and I'll send it to you MIME encoded in your mail.

 I also have loads of scripts for use with Photogenics V2 - if your
 interested let me know. They all need a bit of tidying up before I would
 consider uploading them as a package, but if you want the odd one or two -
 they can goes "as they are!"

@endnode

@node "Contact" "Contact"


                                  @{fg shine}Contact
                                  ~~~~~~~@{fg text}
 


         I can be contacted by e-mail at the following address.


                        robert.wilson@bigfoot.com 


                @{"  " system "rx rexx:Mail2RW.rexx"} <-- Click here to send me mail with YAM.
                               


       I am working on my homepage at the moment and hope to have
          everything up and running in the next month or so.

@endnode
