PMMail/2 and Faxworks

Rich pmmail@rpglink.com
Sun, 01 Oct 2000 00:10:01 -0400 (EDT)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is this list still functioning?

Anyway... First off, Thank you Trevor for your PMM2FAX.CMD file!

I'm sorry I didn't realize in my previous post that the header and attachment lines would actually come through as an 
attachment...

In the mean time, I finally figured out how to get the script to work. I don't know yet if there's something wrong with my 
setup here, but I don't get the proper header lines when I send myself a fax through PMMail and there is no 
Content...filename= line in the header. Just the "begin 644 filename" at the beggining of the attachment.

So just in case anyone runs into the same problem, I've included the modified cmd file here. I suppose now I'll have 
to learn a little bit about Rex, especially if that's one X or two?

Rich...

Modified PMM2FAX.CMD follows:
(with preceeding single quotes to make sure this time)


'/* Purpose: PMM2FAX will locate the Subject: and From: fields as well
'   as the attachment file name in an email message. This information
'   is then used to call FxRcv.exe (which comes with PMfax) so the
'   FAXes can be logged with a subject and name attached to them.
'   When used with a PMMail/2 filter, this program will allow
'   automatic reception of FAXes by email.
'   Limitations: PMM2FAX can only receive and log one FAX attachment per message
'   Note: This script was tested only with PMfax but may also work with FaxWorks for OS/2.
'
'   Installation/Usage:
'
'   1) Enter the full path to the PMfax directory (where FxRcv.exe and
'      all your faxes are stored) in the appropriate location below
'
'   2) Place this file (PMM2FAX.CMD) in a directory somewhere on your
'      hard disk (you have most likely already done this if you're
'      reading this file)
'
'   3) set up a "Simple" filter in PMMail/2 to do the following:
'
'      a) Search the <Attachment Names> field for ".FAX" (without the
'         quotation marks)
'
'      -Or- (select the "Or" connective from the drop-down list)
'
'      b) Search the Subject: field for "EMAIL FAX"
'
'      c) In the first "Actions" drop-down list select "Save
'         attachments to directory"
'
'      d) In the resulting entryfield, enter the full path to your
'         PMfax directory (the same one you entered below as
'         instructed in step #1
'
'      e) In the first "Actions" drop-down list select "User hook
'         (background)"
'
'      f) In the resulting entryfield, enter the full path to this file
'
'      g) Make sure you click the "Enabled" and "Incoming" checkboxes!
'
'   Please send comments, bug reports and suggestions to trevor@haligonian.com
'
'*/
'/* get the name of the email message from PMMail/2 */
'
'Arg InputFileName
'
'/* Enter the full path to the directory on your hard disk containing
'
'PMfax and FxRcv.exe here */
'
'FaxReceiveDir = "F:\FAXWORKS\"
'
'/* Added FaxDir because my daxes are stored in the Fax directory. */
'FaxDir = "F:\FAXWORKS\FAX\"
'
'/* set the other defualt values */
'
'FromID = ""
'Subject = ""
'FaxFileName = ""
'
'/* start reading through the email message */
'
'Do while Lines(InputFileName)
'
'	Line = Linein(InputFileName)
'	Parse var Line Header Rest
'	Select
'		When (Header = "From:") & (FromID = "") then do
'			/* This is the "From:" line from the email header so... */
'			Parse var Rest '"' Name '" <' Address '>'
'			FromID = Name || ' (' || Address || ')'
'			/* switched the < and > to ( and ) above because FxRcv doesn't
'			like < and > */
'			Say FromID
'			end /* when then do */
'		When (Header = "Subject:") & (Subject = "") then do
'			/* This is the "Subject:" line from the email header so... */
'			Subject = Rest
'			Say Subject
'			end /* when then do */
'		When (Header = "Content-Type:") & (FaxFileName = "") & (Pos('name="',Rest) > 0) & 
(Pos('.FAX"',Rest) > 0) then do
'
'			/* This is very likely an attachment containing a FAX so... */
'			Parse var Rest LeadingChars 'name="' FaxFileName '"' TrailingChars
'			Say FaxFileName
'			end /* when then do */
'
'		/* added code for PMMail sent email-fax without proper headers */
'		When (Header = "begin") & (FaxFileName = "") & (Pos('644',Rest) > 0) & (Pos('.FAX',Rest) > 0) then 
'do
'
'			/* This is very likely an attachment containing a FAX so... */
'			Parse var Rest LeadingChars '644' FaxFileName TrailingChars
'			Say FaxFileName
'			end /* when then do */
'
'
'		Otherwise
'			/* we're ignoring every other line in the email so... */
'			nop
'		end /* select */
'	end /* do while */
'
'	/* Now that we've found the Subject, Sender and attachment file
'	name, we call FxRcv.exe */
'
'	FaxReceiveDir || 'fxrcv -rcvd ' || '"' || FaxDir || FaxFileName || '"' '"' || FromID || '"' '"' || Subject || '"'
/* Pause */
'EXIT /* end REXX script */
'
******************************************************************************
Practice Random Acts of Kindness and Senseless...Umm...Uhh....
  Oh - Heck...I never could remember all that "nice" stuff.
- -----------------------------{rich@bearlycomputing.com}------------------------------
******************************************************************************


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0 OS/2 for non-commercial use
Comment: PGP 5.0 for OS/2
Charset: noconv

wj8DBQE51qsDBxPGE7kCCh0RAs6XAKDLEkLFPV/5LOP4KmRgXCZ/4Wf4IgCgro9g
m0xsJbF/tq7GyLjPBNAHzzk=
=yN/9
-----END PGP SIGNATURE-----