Todd,
Okay, I did it for you even though you didn't write back! A bit
of penance for participating in all that OT activity.
To do this, you will need a copy of bcwmail, a command-line SMTP
sender that's exremely easy to use and cheap shareware. Download a
copy from www.bcwaresystems.com before you start (I have no
affiliation with them). It used to be called sendmail.exe, but
Sendmail got mad. Its purpose is just that, to create a Win32
equivalent to running Sendmail from the *nix command line that has
lots of features, like HTML (blah) and attachment support. These
features make it better than Imail's command line by far. It has a nag
at the bottom of every message if you don't register it--maybe that's
even okay in your environment.
Okay, now that you've got it, put it in the Imail directory. Create a
Program Alias that you want to be handle the attachment feedback. (If
you want different attachments to be linked to a user's sub-areas, you
can also use rules and Info Manager's "After responding, forward mail
to:" feature to filter the mail and forward it to the appropriate
Program Alias.) To start, though, just create the PA. Have it point
to:
c:\winnt\system32\cscript.exe c:\imail\attachmentresponder.vbs
Yes, this uses a WSH shell script. If you're concerned about security,
disable the association of VBS files with WSH and name your script
someting else, like ATTACHMENTRESPONDER.NOHACK. You're passing the
name on the command line, so it will work with whatever name you want.
The text file attached to this message is the framework for the
ATTACHMENTRESPONDER script (you will have to adapt for your domain
name and the actual binary file you want to send, but I think it's
commented well enough to work that out easily). The script's main
function is to parse out the original sender, then launch bcwmail to
send a message back to the sender with the desired file attached.
Write back if you have any difficulties.
Sandy
Set args = wscript.arguments 'Create handle
to executive to retrieve command line arguments
If args.count = 0 Then wscript.quit 'If no
argument passed for some reason, exit script
Set fso = CreateObject("Scripting.FileSystemObject") 'Create handle
for file I/O
Set tmpfile = fso.OpenTextFile(args.item(0)) 'Open temp
file created by Imail
Do while tmpfile.AtEndOfStream <> True 'Loop through
lines in file to find From: header
currline = tmpfile.readline 'Set current
line to %currline
if left(currline,5) = "From:" then foundfrom = 1 : exit do 'Set flag and
exit loop if there's a From:
Loop
tmpfile.close 'Close temp
file no matter what we found
fso.DeleteFile args.item(0), true 'Delete it,
too
Set fso = nothing 'Destroy file
object just to be neat
If foundfrom = 0 then wscript.quit 'If no From:
line for some reason, exit script
sender = right(currline,len(currline)-instr(currline,"<")) 'Build %sender
by trimming down From: line to bare essentials
sender = left(sender,len(sender)-1) 'Finish
trimming
runcmd = "c:\imail\attbak\bcwmail.exe -subj " & CHR(34) 'Build
%runcmd, command line we'll be sending to bcwmail
runcmd = runcmd & "The file you requested is attached" & CHR(34) 'Keep
building, adding subject
runcmd = runcmd & " -r 127.0.0.1 -from [EMAIL PROTECTED]" 'Keep
building, adding server and reply-to
runcmd = runcmd & " -A c:\winnt\lanmannt.bmp -to " & sender 'Finish
building, add dummy attachment and recipient
Set wsh = CreateObject("Wscript.Shell") 'Create handle
for shell operations
wsh.run(runcmd),1,true 'Shell to
bcwmail to send message back to sender
Set wsh = nothing 'Destroy shell
object just to be neat