---------------------------------------------------------------
[FYI] How to use cmail on Windows

1999/02/12 Masaki YATSU <yatsu@ele.kimmon.co.jp>

1. Introduction

   A 'mail server' uses Simple Mail Transfer Protocol (SMTP) to send
   and receive Email messages. Most UNIX based systems come with the
   'sendmail' program which utilizes SMTP to transfer messages;
   therefore, Email messages can be easily sent from Emacs/Mule by
   invoking the sendmail program, without much burden in configuring
   the system as explained in the rest of this document.
   # by default cmail is configured to use the sendmail program.
   
   Windows95/98/NT does not come with the sendmail program. MUAs (Mail
   User Agent; an applicaiton on which a user would read/write Email
   messages) that run on Windows typically drive SMTP by themselves
   where cmail does not.

   This means that you can use cmail on Meadow (a variant of
   Emacs/Mule that run on Windows) if it can drive SMTP directly.  And
   a library called smtpmail.el for this purpose is already attached
   to Meadow.  Relatively old Semi-guns package that come with Meadow
   or (rectnt) flim pacakge also include smtpmail.el.


2. Tips for using smtpmail.el on Meadow

   Meadow come with Semi-gnus, which includes its own smtpmail.el,
   while Meadow itself come with another smtpmail.el.

     Meadow\1.00\lisp\mail\smtpmail.el
     Meadow\site-lisp\Semi-gnus\smtpmail.el

   These smtpmail.el provide the same functionality, but some lisp
   variables used in them are different, so please be careful.

     mail\smtpmail.el             |  Semi-gnus\smtpmail.el
     -----------------------------+-----------------------
     smtpmail-default-smtp-server | smtp-default-server
     smtpmail-smtp-service        | smtp-service
     smtpmail-local-domain        | smtp-local-domain
     smtpmail-debug-info          | smtp-debug-info

   If you do not use Semi-guns, it is better to designate
   Meadow\1.00\lisp\mail\smtpmail.el explicitly by modifing
   Meadow\site-lisp\subdirs.el as follows.

     (normal-top-level-add-to-load-path '("mel"
                                          "semi"
     ;;                                   "Semi-gnus"
                                          ))

   # However, it is recommended to use Semi-gnus\smtpmail.el

   Also, recent flim package includes smtpmail.el. If you have
   already installed apel, flim, semi, it is advised to use
   smtpmail.el in flim.

   In case if you use Semi-gnus\smtpmail.el or smtpmail.el which come
   with flim, it might be better to delete
   Meadow\1.00\lisp\mail\smtpmail.el(and smtpmail.elc) (maybe this is
   too offensive) or change the file name. (I use name+"-" for example
   smtpmail.el-).

   Do not forget about smtpmail.elc when smtpmail.el is manipulated
   (or vise versa).


3. Configurinag E-Mail environment

   Before configuring smtpmail.el (Meadow standard,
   Semi-gnus\smtpmail.el, flim attached), please configure the
   following variable which would be useful.

   ;; mail-from-style can be one of the following symbols:
   ;;  `nil'    --> foo@bar.hoge.jp
   ;;  `parens' --> foo@bar.hoge.jp (YOUR NAME)
   ;;  `angles' --> YOUR NAME <foo@bar.hoge.jp>
   ;; 
   (setq user-mail-address "foo@bar.hoge.jp"
         user-full-name "YOUR NAME"
         mail-from-style 'angle
         mail-use-rfc822 t 
         )

4. Configuring smtpmail.el parameters.

   Now, configure smtpmail.el parameter as follows:

   4.1 When using smtpmail.el in flim-1.12.5

       (the same definition would probably work for
       Semi-gnus\smtpmail.el which is attached to Meadow.)
   
       (autoload 'smtpmail-send-it "smtpmail")
       (setq send-mail-function 'smtpmail-send-it
             smtp-default-server "YOUR SMTP HOST"
             smtp-service 25 ; "smtp" is also allowed.
             smtp-local-domain "YOUR NAME"
             smtp-debug-info t
             )

   4.2 When using Meadow\1.00\mail\smtpmail.el

       (Please make sure you have disabled Semi-gnus\smtpmail.el
       attached to Meadow or attached to flim.)

       (autoload 'smtpmail-send-it "smtpmail")
       (setq send-mail-function 'smtpmail-send-it
             smtpmail-default-smtp-server "YOUR SMTP HOST"
             smtpmail-smtp-service "smtp"
             smtpmail-local-domain "YOUR DOMAIN NAME"
             smtpmail-debug-info t
             smtpmail-code-conv-from nil
             )

5. Conclusion

   With the above procedure, preparation for sending Email messages
   from Meadow/cmail using smtpmail.el is completed. Once movemail and
   cmail are properly configured, you should be able to send and
   receive Email messages.

   Again, please do not forget to consider which sendmail.el out of
   the following you want to use when configuring your system.

     Meadow\1.00\lisp\mail\smtpmail.el
     Meadow\site-lisp\Semi-gnus\smtpmail.el
     smtpmail.el come with flim

   If you still have trouble, confirm what it is written above and
   revisit your configuration again.
