[Zope] attaching an image to an email

Jonathan dev101 at magma.ca
Wed Jun 28 16:55:05 EDT 2006


----- Original Message ----- 
From: "Kate Legere" <klegere at kfpl.ca>
To: <zope at zope.org>
Sent: Wednesday, June 28, 2006 4:05 PM
Subject: [Zope] attaching an image to an email


> I'm writing a form which allows the user to send an image attachment with
> their email...
>
> <form method=post action="sendPic" ENCTYPE="multipart/form-data">
> <p>Attach: <input type="file" name="pic.jpg"></p>
>
> <p>Send to:</p>
> <p>
>   <input type="checkbox" name="send_to:list" value="mymail at mail.ca">
>  My email
> </p>
> <input type=submit value="Send Picture">
> </form>
>
>
> ------ it's handled with sendPic -----------
>
> <dtml-sendmail smtphost="mail.host.ca">
> To: art critic
> From: patron
> Subject: Art
>
> Hi, please take a look at my art and post it if you think it's good 
> enough.
>
> <dtml-mime type=image/jpeg encode=base64 name=resume><dtml-var pic.jpg >
>  </dtml-mime>
>
> </dtml-sendmail>
>
> <p>Your image was sent.</p>
>
>
> --------- but it only delivers -------
>
> Hi, please take a look at my art and post it if you think it's good 
> enough.
>
> Mime-Version: 1.0
> Content-Type: multipart/mixed;
>    boundary="192.168.10.45.502.995.1151524502.277.30154"
>
>
> --192.168.10.45.502.995.1151524502.277.30154
> Content-Type: image/jpeg;
>    name="pic.jpg"
> Content-Transfer-Encoding: base64
>
> PFpQdWJsaXNoZXIuSFRUUFJlcXVlc3QuRmlsZVVwbG9hZCBpbnN0YW5jZSBhdCAweDkzNjFmZDQ+
> CiAg
>
>
> ---------
> What am I doing wrong?

This how-to may help:

http://www.zope.org/Members/visibleoffice/HowTo.2003-10-22.1455



Jonathan




More information about the Zope mailing list