[Zope] EMail with uploaded attachments

Klaus Herrmann Klaus Herrmann <klaus.herrmann@goelz.com>
23 Jan 2001 16:20:50 CET


Hi Folks!

I have another problem:
I wrote a nice web interface for email feedback etc., but i want to add an
option for attaching files to the emails. how can i do this? i can't get it to
work.
i have this:

<form action="send_email" method=post enctype="multipart/form-data">
..
<input type=file size=18 maxlength=3000000
 name="attached_file">
</form>

and in send_email:

<dtml-sendmail mailhost=fox>
To: ...
From: ...
Subject: ...
<dtml-mime type=text/plain encode=7bit>

plain text....

<dtml-boundary type=application/octet-stream
disposition=attachment encode=base64>
<dtml-var attached_file></dtml-mime>

</dtml-sendmail>

but the only result is that the attachments contains:
<ZPublisher.HTTPRequest.FileUpload instance at 88b4df0>

what am i doing wrong?

thanks in advance!

bye,
	Klaus

-- 
Klaus Herrmann <klaus.herrmann@goelz.com>
Goelz & Schwarz GmbH, Munich
www.goelz.com
phone:+49 - (0)89 - 544 67 0 22
fax: +49 - (0)89 - 544 67 0 10