[Zope] Newbie Q: Mime attachments

Eric Culpepper eculpepper@hcc-care.com
Mon, 27 Sep 1999 11:51:47 -0500


If this is a FAQ please point me where I can RTFM and I'll be more than
happy to do so :)

I'm still trying to get my mind around this entire Zope application, but I
have managed to do a simple mail form with attachments..My question is that
although the attachment does go through, the name of the file doesn't, and
the attachment often is named something "from left field" ie: ATT08015.ATT
or something similar.. I would like the name of the file to be maintained
with the attachment. Here is my sample:

<form method=post action=SendEmail ENCTYPE="multipart/form-data">
Subject: <input type=text name=subject size=40><br>
<textarea name=body rows=10 cols=50>
</textarea><br>
File To Send: <INPUT TYPE=file NAME="afile" SIZE="25"><br>
<input type=submit value="Send Email">
</form>

<!--#sendmail mailhost=MailHost-->
To: Eric Culpepper <eculpepper@hcc-care.com>      (left as is for testing
purposes.)
From: Eric Culpepper <eculpepper@hcc-care.com>   (left as is for testing
purposes.)
Subject: <!--#var subject-->
<!--#mime type=text/html encode=7bit-->
<!--#var body-->

<!--#boundary type=application/octet-stream disposition=attachment 
encode=base64--><!--#var "afile.read()"--><!--#/mime-->

<!--#/sendmail-->

Any help or pointers would be most appreciated!
Eric Culpepper