I'm not sure exactly what you're trying to do. But here's the multipart sendmail syntax I use to handle uploaded resumes (CVs). It may give you some other ideas to try. I suspect one of your problems is the <dtml-boundary type="application/octet-stream"> statement. If you want your attachment to behave as a GIF, it should probably have the mime-type for a GIF file. -- Loren <dtml-with "PARENTS[-1]"><dtml-sendmail mailhost=MailHost> To: staffing@morphics.com, sangeeta@morphics.com Reply-to: <dtml-var ReplyTo> From: <dtml-var ReplyTo> Subject: ER: <dtml-var FName missing> <dtml-var LName missing> -- <dtml-var Requisition missing> <dtml-if "CVfile.filename"> <dtml-mime type="text/html" encode="7bit"> <pre><dtml-var Format></pre> <dtml-boundary type_expr="getMimeType(CVfile)" name_expr="uploadFileName(CVfile.filename)" disposition=attachment encode=base64> <dtml-var expr="CVfile.read()"></dtml-mime><dtml-else> <dtml-mime type="text/html" encode="7bit"> <pre><dtml-var Format></pre></dtml-mime></dtml-if "CVfile.filename"> </dtml-sendmail></dtml-with "PARENTS[-1]">
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Kam Nejad Sent: Tuesday, April 17, 2001 10:50 To: zope@zope.org Subject: [Zope] need help on mail attachment using dtml
I am using the following code to send an attachment in this case a gif image:
<dtml-sendmail mailhost=kammail> To: knejad@codeit.com From: someone@someplace.com Subject: <dtml-var subject> <dtml-mime type="text/plain" encode=7bit> <dtml-var body>
elvis is cool!
<dtml-boundary type="application/octet-stream" filename="REQUEST['elvis'].getId() encode=base64><dtml-var "elvis"></dtml-mime> </dtml-sendmail>
Mail with attachment was sent!
when i recieve the email the file type is not shown. it should be a gif. I can save and view the file but it is saved as .html file. Also the filename is not rendered. Would appreciate some help on this.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )