home *** CD-ROM | disk | FTP | other *** search
/ Shareware Supreme Volume 6 #1 / swsii.zip / swsii / 151 / PMAIL301.ZIP / RESOURCE.ZIP / TPHONE.R < prev   
Text File  |  1993-08-22  |  9KB  |  319 lines

  1. #
  2. #   TPHONE.R
  3. #   Sample programmable mail form for Pegasus Mail v3.0
  4. #   Copright (c) 1993, David Harris, All Rights Reserved.
  5. #
  6. #   You are granted the right to modify and distribute this
  7. #   form in any way you wish provided you do not sell it or
  8. #   any derivative either on its own or as part of any other
  9. #   package.
  10. #
  11. #   By using this form you agree to hold the author blameless
  12. #   for all or any damages or losses resulting from its use.
  13. #
  14. #   TPHONE is a simple but functional telephone note form
  15. #   for use within PMail.
  16. #
  17.  
  18. include defines.rh
  19. include forms.rh
  20.  
  21. string form_title     "Telephone message form";
  22.  
  23. window fwindow    # The window in which the form appears
  24.    {
  25.    24, 4, 53, 19, BLIGHTGREY | RED | wshadow | wplain,
  26.    BLIGHTGREY | BLUE, ' ', BSINGLE,
  27.    " Telephone message "
  28.    };
  29.  
  30. block field_text
  31.    {
  32.    3, 1, BLIGHTGREY | BLUE,
  33.    "To:",
  34.    "at {hour}:{minute}, ",
  35.    "of:",
  36.    "ph:",
  37.    " -                      and:"
  38.    };
  39.  
  40. data to           # The "to" field for the message
  41.    {
  42.    8, 1, 38, 179, YELLOW, LIGHTBLUE, 0, GT_STRING, 0
  43.    };
  44.  
  45. data caller       # The name of the person who called
  46.    {
  47.    17, 2, 27, 80, YELLOW, LIGHTBLUE, 0, GT_STRING, 0
  48.    };
  49.  
  50. data of           # The "of" field on the phone form
  51.    {
  52.    8, 3, 38, 80, YELLOW, LIGHTBLUE, 0, GT_STRING, 0
  53.    };
  54.  
  55. data phone        # The "phone number" field on the phone form
  56.    {
  57.    8, 4, 36, 80, YELLOW, LIGHTBLUE, 0, GT_STRING, 0
  58.    };
  59.  
  60. menu action_menu
  61.    {
  62.    4, 0, 0, 0, 0;
  63.  
  64.    1, 1, 0, 'T', 0, "Telephoned",
  65.    1, 2, 0, 'D', 1, "Dropped in",
  66.    1, 3, 0, 'R', 2, "Returned your call",
  67.    1, 3, 0, 'F', 3, "Faxed you",
  68.    };
  69.  
  70. popup_menu what
  71.    {
  72.    action_menu, 0, 0, 8, 5, 
  73.    BBLUE | YELLOW | wshadow, BLIGHTGREY | LIGHTBLUE
  74.    };
  75.  
  76. menu title_menu
  77.    {
  78.    4, 0, 0, 0, 0;
  79.  
  80.    1, 1, 0, 'M', 0, "Mr",
  81.    1, 2, 0, 'R', 1, "Mrs",
  82.    1, 3, 0, 'S', 2, "Ms",
  83.    1, 4, 0, 'D', 3, "Dr"
  84.    };
  85.  
  86. popup_menu title
  87.    {
  88.    title_menu, 0, 0, 13, 2,
  89.    BBLUE | YELLOW | wshadow, BLIGHTGREY | LIGHTBLUE
  90.    };
  91.  
  92. menu wants_menu
  93.    {
  94.    4, 0, 0, 0, 0;
  95.  
  96.    1, 1, 0, 'P', 0, "Wants you to call",
  97.    1, 2, 0, 'W', 1, "Will call again",
  98.    1, 3, 0, 'C', 2, "Call urgently",
  99.    1, 4, 0, 'O', 3, "Other (see below)"
  100.    };
  101.  
  102. popup_menu wants
  103.    {
  104.    wants_menu, 0, 0, 33, 5, 
  105.    BBLUE | YELLOW | wshadow, BLIGHTGREY | LIGHTBLUE
  106.    };
  107.  
  108. text hlp_to       # Help field for the to: field
  109.    {
  110.    "To field\n",
  111.    "\n",
  112.    "Enter in this field the e-mail address of the\n",
  113.    "person to whom this notification is being sent.\n",
  114.    "\n",
  115.    " Press <F2> for a list of local e-mail users.\n",
  116.    " Press <F3> to access your address books.\n",
  117.    " Press <F6> to access mail distribution lists.\n",
  118.    "\n",
  119.    "If you want to cancel the message at any time,\n",
  120.    "press the <Esc> key.\n"
  121.    }
  122.  
  123. text hlp_title
  124.    {
  125.    " Caller's Title \n",
  126.    "Press <Enter> here to open a popup menu\n",
  127.    "from which you can choose the title most\n",
  128.    "appropriate for the caller.",
  129.    }
  130.  
  131. text hlp_name     # Help field for the of: field
  132.    {
  133.    "Name field\n",
  134.    "Enter here the name of the person who is leaving\n",
  135.    "the phone message\n",
  136.    "\n",
  137.    "If you want to cancel the message at any time,\n",
  138.    "press the <Esc> key."
  139.    }
  140.  
  141. text hlp_of       # Help field for the of: field
  142.    {
  143.    " Of field \n",
  144.    "Enter in this field the name of the company or\n",
  145.    "Organization the caller represents. You can leave\n",
  146.    "this field blank if you wish.\n",
  147.    "\n",
  148.    "If you want to cancel the message at any time,\n",
  149.    "press the <Esc> key."
  150.    }
  151.  
  152. text hlp_what     # Help for the "what he did" popup menu
  153.    {
  154.    " Caller's Action \n"
  155.    "Select from this menu the means the caller\n"
  156.    "used to make contact - namely, whether the\n",
  157.    "caller phoned, dropped in or sent a fax."
  158.    };
  159.  
  160. text hlp_wants    # Help for the "what he should do" popup menu
  161.    {
  162.    " Requested Action \n"
  163.    "Press <Enter> here to open a popup-menu listing the\n",
  164.    "action the caller requests the recipient should take\n",
  165.    "regarding this message.\n",
  166.    "\n"
  167.    "Highlight the most appropriate choice in the list and\n",
  168.    "press <Enter>. If nothing in the list is appropriate,\n",
  169.    "you can go into more detail in the message body."
  170.    };
  171.  
  172. text hlp_phone    # Help for the "phone number" popup menu
  173.    {
  174.    "Phone number\n"
  175.    "\n",
  176.    "Enter the caller's contact phone number\n",
  177.    "in this field."
  178.    "\n"
  179.    };
  180.  
  181. text val_address         # Generic address validation routine
  182.    {
  183.    "Must be valid address\n"
  184.    };
  185.  
  186. line xline_1
  187.    {
  188.    0, 6, 60, 0, RED, '─'
  189.    };
  190.  
  191. line xline_2
  192.    {
  193.    0, 14, 60, 0, RED, '─'
  194.    };
  195.  
  196. box status
  197.    {
  198.    3, 15, 42, 3, 0, BLACK | BLIGHTGREY
  199.    };
  200.  
  201. editor message
  202.    {
  203.    1, 7, 48, 6, 48, 50, 2000, BLUE | BLIGHTGREY
  204.    };
  205.  
  206.  
  207. block to_txt
  208.    {
  209.    0, 0, 0,
  210.    "Enter the name of the person to whom this",
  211.    "phone message should be sent."
  212.    };
  213.  
  214. block title_txt
  215.    {
  216.    0, 0, 0,
  217.    "Press <Enter> to select the title of the",
  218.    "person leaving the message, or use the",
  219.    "arrow keys to move on."
  220.    };
  221.  
  222. block caller_txt
  223.    {
  224.    0, 0, 0,
  225.    "Enter the name of the person leaving the",
  226.    "message in this field."
  227.    };
  228.  
  229. block of_txt
  230.    {
  231.    0, 0, 0,
  232.    "Enter the name of the organization which",
  233.    "the person leaving the message represents",
  234.    "(optional)."
  235.    };
  236.  
  237. block phone_txt
  238.    {
  239.    0, 0, 0,
  240.    "Enter here the phone number of the person",
  241.    "leaving the message."
  242.    };
  243.  
  244. block what_txt
  245.    {
  246.    0, 0, 0,
  247.    "Press <Enter> to choose from a menu of",
  248.    "choices describing how the caller got in",
  249.    "contact."
  250.    };
  251.  
  252. block wants_txt
  253.    {
  254.    0, 0, 0,
  255.    "Press <Enter> to select the action the",
  256.    "recipient is asked to take regarding this",
  257.    "message."
  258.    };
  259.  
  260. block message_txt
  261.    {
  262.    0, 0, 0,
  263.    "Edit any extra message details you need to",
  264.    "add in this field. Press <Ctrl-Enter> once",
  265.    "you have finished preparing the message."
  266.    };
  267.  
  268.  
  269. ##  The next record is the formatting record for this form - it controls
  270. ##  how the information is output into the message generated when the
  271. ##  form is sent.
  272.  
  273. text format
  274.    {
  275.    "\n",
  276.    "    ┌──────────── T e l e p h o n e  M e s s a g e ─────────────┐\n",
  277.    "    │                                                           │\n",
  278.    "    │  To: {to}{tab 32}  From: {servername}/{username} {tab 64}│\n",
  279.    "    │                                                           │\n",
  280.    "    │  {field 11} {field 12} of {field 13}{tab 64}│\n",
  281.    "    │  {field 15} at {rfc-date} (id: {field 5}){tab 64}│\n",
  282.    "    │                                                           │\n",
  283.    "    │  ** {field 16} **{tab 39}ph: {field 14}{tab 64}│\n",
  284.    "    │                                                           │\n",
  285.    "    └───────────────────────────────────────────────────────────┘\n",
  286.    "\n",
  287.    "    ────────────────────────── Message ──────────────────────────\n",
  288.    "\n",
  289.    "    {message}\n",
  290.    };
  291.  
  292.  
  293. string subject_string      "Telephone message";
  294. string serial_string       "{serial ~a/forms/serial}";
  295.  
  296. formtable formdata
  297.    {
  298. #  Name........ Correlation. Help text.... Validation... Status...... Default
  299.    fwindow,     F_WINDOW,    0,            0,            0,           0,
  300.    status,      F_STATUS,    0,            0,            0,           0,
  301.    field_text,  0,           0,            0,            0,           0,
  302.    xline_1,     0,           0,            0,            0,           0,
  303.    xline_2,     0,           0,            0,            0,           0,
  304.    0,           F_STRING,    0,            0,            0,           serial_string,
  305.    0,           F_SUBJECT,   0,            0,            0,           subject_string,
  306.    0,           F_NOSIG,     0,            0,            0,           1,
  307.    0,           F_COPYSELF,  0,            0,            0,           0,
  308.    format,      F_SMTP_TEMPLATE, 0         0,            0,           0
  309.    to,          F_TO,        hlp_to,       val_address,  to_txt,      0,
  310.    title,       F_STRING,    hlp_title,    0,            title_txt,   0,
  311.    caller,      F_STRING,    hlp_name,     0,            caller_txt,  0,
  312.    of,          F_STRING,    hlp_of,       0,            of_txt,      0,
  313.    phone,       F_STRING,    hlp_phone,    0,            phone_txt,   0,
  314.    what,        F_STRING,    hlp_what,     0,            what_txt,    0,
  315.    wants,       F_STRING,    hlp_wants,    0,            wants_txt,   0,
  316.    message,     F_MESSAGE,   0,            0,            message_txt, 0
  317.    };
  318.  
  319.