procmail
[Top] [All Lists]

Re: Attaching a file to an Autoresponse

1998-03-24 09:42:14
Hi,
        Here is what I use to autorespond with a MIME file. Here is the recipe
that does it.  Obviously, you need to have mimencode on your system to do the
encoding.  This would work with any sort of file, though you might want to
modify the file type for different files.  Note that you could send any number
of files using this method.
        What this does is:
*       Define the message as mime
*       Define the boundary.
*       Put in a boundary ( The fls3jekls3=_sd3\" stuff.  It can be any unique
string that you want)
*       Define the content type of the response text (TEXT/PLAIN in this case).
*       Reply with a message (the file pdf.rsp)
*       Put in a boundary
*       Define the content type of the response text (APPLICATION/PDF).
*       Encode and append the PDF copy of my resume (saroffm.pdf)
*       Put in a boundary
        Please also note that there is a free PostScript to PDF converter out
on the web.  This may be a better idea than Word, as the appearance is more
uniform, and I haven't heard of any Acrobat macro viruses.  The guy does it out
of the goodness of his heart (and accord to the web page he is not violating
his license), so don't abuse it.  the URL for the service is:
http://www.babinszki.com/distiller/

#This sends my resume as a mime attachment to anyone who wants a
#copy of my resume in PDF (Acrobat) format
:0ch
* ^Subject:.*send pdf resume
* !^X-Loop: msaroff(_at_)pca\(_dot_)net
| (formail -r \
     -I"X-Loop: msaroff(_at_)pca\(_dot_)net"\
     -I"MIME-Version: 1.0"\
     -I"Content-Type: multipart/mixed; boundary=\"fls3jekls3=_sd3\"";\
   echo "--fls3jekls3=_sd3";\
   echo "Content-type: TEXT/PLAIN; charset=US-ASCII";\
   echo "";\
   cat $HOME/pdf.rsp;\
   echo "--fls3jekls3=_sd3";\
   echo "Content-Type: APPLICATION/PDF; name=\"saroffm.pdf\"";\
   echo "Content-Transfer-Encoding: base64";\
   echo "Content-Description:";\
   echo "";\
   /usr/bin/mimencode -b $HOME/saroffm.pdf;\
   echo "--fls3jekls3=_sd3--") | $SENDMAIL -t



On Mar 24, 12:11pm, Sean Witham wrote:
Subject: Re: Attaching a file to an Autoresponse

Word is a bad choice. A lot of sites filter word out because it
carries macro viruses. Uses words RTF format if you must. Some users
may prefer a PostScript version though.

--Sean

On Tue, 24 Mar 1998, Deane wrote:

I wonder if anyone could offer a bit of advice.  I have been reading these
procmail messages for over three months
now and no one seems to have asked about this aspect of using procmail.

I am still baffled by how to write a recipe that will take a MIME BASE 64
encoded file (originally an application form
prepared in MS-Word) and attach it to a text file message sent back by an
autoresponder.

The autoresponder recipe I have written works fine.  But I have been
unsuccessful in having my e-mail client detect
the MIME attachment and un-encoding it.  It comes back to me as one long
text file with the encoded text as is.  I
have to use another program, such as Wincode to convert it back into the
original Word doc file.

Is there a way to attach to the text message encoded application form such
that any mail client that can decode a
MIME attachment will un-encode it and present it as the original Word
document file?  Then the recipient would only
need to open the document in Word and all formatting/spacing problems would
be solved.

TIA


--
R.K.Deane
Discount Telecom Central-- Dramatically Low Phone Rates
TeleMatrix HyperCall Callback service (international)
http://www.bekkoame.or.jp/~deane/index.html
TeleMatrix Internet Phone service (Japan and international)
http://www.bekkoame.or.jp/~deane/net-phone.html


-- End of excerpt from Sean Witham



--
--
Matthew Saroff
Do not reply directly to this message.  Reply to
msaroff(_at_)pobox(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>