[Zope] File Attachments with Sendmail
Chris Withers
chrisw@nipltd.com
Thu, 31 Aug 2000 12:27:09 +0100
Brendon Grunewald wrote:
> I am battling to find the information needed to attach word, excel, and pdf
> documents to an email based on the input from a form.
> This is what I have so far:
I do wish you'd move to the new syntax style :P
> <!--#sendmail mailhost="MailHost"-->
> To: <dtml-var Email_address>
> From: WebForm <Webmaster@mysite.com>
> Subject: Web doc request
> <dtml-mime type=text/plain encode=7bit>
> Attached is the document you requested.
looks fine...
> <dtml-boundary type=application/<dtml-var Doc_Type> disposition=attachment
> encode=quoted-printable>
> <dtml-var <dtml-var Requested_Document>>
> </dtml-mime>
My bit of the above is a bit different:
<dtml-boundary name="the_file_name" type=application/octet-stream
disposition=attachment encode=base64><dtml-var
"a_file_object.read()"></dtml-mime>
Which might make all the difference ;-)
cheers,
Chris
PS The above works for me on Zope 2.1.6...