
Lesson #19f -- Explanation for Lesson 18b (cont)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--------------------------  MAIL TRANSFER --------------------------
1:      {IFEX %repdir%%bbsid.rep,,norep}
2:      {SEND u%suffix}
3:      {LOOK ^XB01}
4:      {EXEC %zprog port %_por sz -m %repdir%%bbsid.rep}
5:      {CALO del_ret,del_rep,%success_p}
6:    {:DEL_RET}
7:      {LOOK %mail_p}
8:    {:NOREP}
9:      {SEND d%suffix}
10:     {SSLO y/n_r,%y/n_p}
11:     {GOLO no_mail,nomail_p}
12:     {LOOK ^XB00}
13:     {EXEC %zprog port %_por rz -m %qwkdir}
14:  {:NOMAIL}
15:     {SSLO quit_r,%mail_p}

#1:  Checks to see if we have replies to send, if not, goes to macro
     ID "norep", if replies exist, then continues to next macro
#2:  Replies must exist if we are here, therefore sends a "u" with
     value for "suffix" (either "|" or "null").  Suffix enables same
     macro to be used on BBS whether/not hot keys are in effect
#3-#4:  Looks for the ZModem startup string, then sends the replies
#5:  If the BBS reports the reply upload was successful, then CALLs a
     subroutine which deletes the .REP
#6:  Macro ID which is return point for the CALOok just above
#7:  After we've uploaded replies, the Mail Door prompt will reappear
#8:  Macro ID, pointed to in the "check for rep" test in Line #1.  If
     there are no replies to be sent, the macro needs to know where
     to go to continue..this is the place
#9:  Send "d" with "suffix" variable.
#10: Responds to "Do you want to download this mail packet (Y/n)?"
     prompt if it should occur
#11: Branches to the macro ID "nomail" if the BBS Mail Door reports
     "Sorry, no mail to download"
#12-#13: Looks for the ZModem download startup string, receives the
         .QWK packet
#14:  Macro ID - place to go to if the BBS reports "No mail to dl"
#15:  At this point, the Mail Door prompt should come back up..sends
      the appropriate response to quit the mail door.  In many cases,
      we can logoff directly from the mail door, and that might be
      the preferred action.  However, there are some mail doors that
      may not allow logoff from the mail door.  Therefore, I
      recommend just quitting back to the BBS and logging off from
      there (or you can do other things after transferring mail, such
      as file activities)

Explanation continues in Lesson #19g.

Jim
