Category : Files from Magazines
Archive   : DBMS9104.ZIP
Filename : OLYMPIA1.APR

 
Output of file : OLYMPIA1.APR contained in archive : DBMS9104.ZIP

PROCEDURE MkccMail
************************************************************
* Program ...: MkccMail.prg
* :
* Author ....: P. L. Olympia, Platinum Software Int'l, 11/90
* :
* Language...: FoxPro. Uses low-level file I/O functions.
* :
* Purpose....: Creates a file that can be IMPORTed into
* : cc:Mail as a message. The message file can
* : have a binary file attached to it. In this
* : implementation, the content of the actual
* : message is read from a text file.
* :
* Public Vars: To minimize the number of parameters passed
* : to this procedure, the following public
* : character memvars should have been assigned
* : appropriate values before this procedure is
* : called:
* : MsgFrom = Name of message sender
* : PswdFrom = Password of message sender
* : CCdata = Path/directory where cc:Mail DB is
* :
* Syntax.....: DO MkccMail WITH MsgTo, MsgSubj, MsgImpt,
* : MsgTxt, FileApnd
: :
* Notes .....: This code has minimal error checking
************************************************************
PARA MsgTo, MsgSubj, MsgImpt, MsgTxt, FileApnd
* | | | | |
* | | | | File to append, if any
* | Msg Subject | |
* |_Receiver name | File containing text of msg
* |_ Name of file this pgm creates
*
* Examples:
* MsgTo = "Molly Puffin"
* MsgSubj = "European FoxPro Conference"
* MsgImpt = "A:\ccmail.imp"
* MsgTxt = "D:\ccmail\puffin\foxconf.txt"
* FileApnd = "F:\DBASE\SLIDES.ZIP"

*-- Comment out these 3 lines if you don't need them
SET TALK OFF
CLOSE ALL
CLEAR ALL

fh_out = FCREATE(msgimpt)
IF fh_out < 0
? "Cannot create ", msgimpt
RETU
ENDIF

*-- Write message headers/preamble
writeit = FPUTS(fh_out, "Message:")
writeit = FPUTS(fh_out, "From: " + msgfrom)
writeit = FPUTS(fh_out, "Date: " + DTOC(DATE()) + ;
" " + TIME())
writeit = FPUTS(fh_out, "To: " + msgto)
writeit = FPUTS(fh_out, "Subject: " + msgsubj)
writeit = FPUTS(fh_out, "Contents:")

*-- Write the actual message
IF FILE(msgtxt)
fh_in1 = FOPEN(msgtxt)
DO WHILE ! FEOF(fh_in1)
str = FGETS(fh_in1)
writeit = FPUTS(fh_out, str)
ENDD
=FCLOSE(fh_in1)
ENDIF

*-- If there is a file to be appended, append it now
IF FILE(fileapnd)
writeit = FPUTS(fh_out, "File Item: " + fileapnd)
ENDIF

=FCLOSE(fh_out)

**-- Send the message to cc:Mail
str = msgfrom + SPAC(1) + pswdfrom + SPAC(1) + ccdata + ;
" @" + msgimpt
! /100 IMPORT &str

RETURN


  3 Responses to “Category : Files from Magazines
Archive   : DBMS9104.ZIP
Filename : OLYMPIA1.APR

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/