Re: [Zope] attaching an image to an email
Kate Legere wrote: I'm writing a form which allows the user to send an image attachment with their email... Look at my MailTemplates product, it makes the solution to this problem trivial... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] attaching an image to an email
On Friday 30 June 2006 07:47, Andreas Jung wrote: > One should really take the *pain-free* way and use Python 'email' Modul to > generate emails - at least when you want to deal with attachments in a > reasonable way. *shrug* I've always found DTML to be more natural to generate emails than PythonScripts. I really don't see what the problem is with not adding whitespace where there should be no whitespace. Now if only I could send links to attached pictures with ... cu... ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] attaching an image to an email
--On 30. Juni 2006 07:44:30 +0200 Berthold Stöger <[EMAIL PROTECTED]> wrote: On Thursday 29 June 2006 15:34, Kate Legere wrote: I get a result like : Cv/Y/+AAEEpGSUYAAQEBAEgASAAA/9sAQwAHBAQEBQQHBQUHCgcFBwoMCQcHCQwNCwsMCwsN EQ0 [...] ... it's longer but you get the picture. Yes, that's what a picture looks like in BASE64. Where is the problem? Can you maybe forward me (off-list) the whole E-Mail "sourcecode"? One should really take the *pain-free* way and use Python 'email' Modul to generate emails - at least when you want to deal with attachments in a reasonable way. -aj pgpEel6oa1r28.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] attaching an image to an email
On Thursday 29 June 2006 15:34, Kate Legere wrote: > I get a result like : > > Cv/Y/+AAEEpGSUYAAQEBAEgASAAA/9sAQwAHBAQEBQQHBQUHCgcFBwoMCQcHCQwNCwsMCwsNEQ0 [...] > ... it's longer but you get the picture. Yes, that's what a picture looks like in BASE64. Where is the problem? Can you maybe forward me (off-list) the whole E-Mail "sourcecode"? cu... ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] attaching an image to an email
Kate Legere schrieb: I get a result like : Cv/Y/+AAEEpGSUYAAQEBAEgASAAA/9sAQwAHBAQEBQQHBQUHCgcFBwoMCQcHCQwNCwsMCwsNEQ0N DQ0NDRENDxAREA8NFBQWFhQUHh0dHR4iIiIiIiIiIiIi/9sAQwEIBwcNDA0YEBAYGhURFRogICAg ICAgICAgICAgISAgICAgICEhISAgICEhISEhISEhIiIiIiIiIiIiIiIiIiIi/8AAEQgGggXsAwER AAIRAQMRAf/EABwAAAMBAQEBAQEBAgMEBQYHCP/EAD8QAAICAgEDAwMDAwMDBAEA CwABAhEDITEEEkEFUWETInEGMoEUQpEVobEHI1IzYsHRFuHxJDRyFyVDgvCS/8QAGwEBAQEBAQEB AQAAAQIAAwQFBgf/xAAmEQEBAQEAAwEBAQEAAgMBAQEAARECEiExA0EEE1FhFCIyQgVx /9oADAMBAAIRAxEAPwDcrUANTIToYo6fIxg2gaQnoRTS+2w1NNcDqp8F+QtEinXv/Bt00d3KDGh9 y7fk2e04Nsel4EESHvYkl3XZg1jmlEkto541tCS7YSdozMc0EjajqM1Ois1pVLKQ6ah5P8lSJp4m Zl2ONafdRsCO9sLG1dU9GI+4cbQrMxXT4MTUv8mwYrXkNaG6H+mnYW+xaYX22l5HGJOXDGBbQ4yd 0Ta2ntCQ/kGCUTWsONBp6p1E2Jg4M0+jRRPlEYDVUUqlHgYLRFhcjG3oolbS0DWm+QiaezMSsMOG noWGgow0xjYTZoo6sqAqJY3wMmjB4sabDRIgQnAFbQjUGkbGIY2m6s2qGgtTgAhsrG1VLySaRX8T h34omGk03+CgS5GqPkIxpsbQf/JNY+NmlYas0OEmr2UIewgI1UafkGlCEAW0GY7XsZh4J1tFeSrT gdoxweTYB/cDaO73MKfd7CcLkax+CAEJH1ci/BsGj+qjwwxpSeaNa5EpUm2ONYuKfINFXQtTsAX4 GNqqsKxPRoQYWn8oohvRFgBQPYqFEsH8mBxoxLjYwDnbMSMDS9zaSto0B2mT8po2uB6ZX1J0iQpZ ... it's longer but you get the picture. yes I get it, its an JPEG 1516x1666. Perfectly except for the extraneus \n (linefeed) in front of it. Thats the problem with DTML :-) You can work around it when you dont have newlines between the tags... Regards Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] attaching an image to an email
I get a result like : Cv/Y/+AAEEpGSUYAAQEBAEgASAAA/9sAQwAHBAQEBQQHBQUHCgcFBwoMCQcHCQwNCwsMCwsNEQ0N DQ0NDRENDxAREA8NFBQWFhQUHh0dHR4iIiIiIiIiIiIi/9sAQwEIBwcNDA0YEBAYGhURFRogICAg ICAgICAgICAgISAgICAgICEhISAgICEhISEhISEhIiIiIiIiIiIiIiIiIiIi/8AAEQgGggXsAwER AAIRAQMRAf/EABwAAAMBAQEBAQEBAgMEBQYHCP/EAD8QAAICAgEDAwMDAwMDBAEA CwABAhEDITEEEkEFUWETInEGMoEUQpEVobEHI1IzYsHRFuHxJDRyFyVDgvCS/8QAGwEBAQEBAQEB AQAAAQIAAwQFBgf/xAAmEQEBAQEAAwEBAQEAAgMBAQEAARECEiExA0EEE1FhFCIyQgVx /9oADAMBAAIRAxEAPwDcrUANTIToYo6fIxg2gaQnoRTS+2w1NNcDqp8F+QtEinXv/Bt00d3KDGh9 y7fk2e04Nsel4EESHvYkl3XZg1jmlEkto541tCS7YSdozMc0EjajqM1Ois1pVLKQ6ah5P8lSJp4m Zl2ONafdRsCO9sLG1dU9GI+4cbQrMxXT4MTUv8mwYrXkNaG6H+mnYW+xaYX22l5HGJOXDGBbQ4yd 0Ta2ntCQ/kGCUTWsONBp6p1E2Jg4M0+jRRPlEYDVUUqlHgYLRFhcjG3oolbS0DWm+QiaezMSsMOG noWGgow0xjYTZoo6sqAqJY3wMmjB4sabDRIgQnAFbQjUGkbGIY2m6s2qGgtTgAhsrG1VLySaRX8T h34omGk03+CgS5GqPkIxpsbQf/JNY+NmlYas0OEmr2UIewgI1UafkGlCEAW0GY7XsZh4J1tFeSrT gdoxweTYB/cDaO73MKfd7CcLkax+CAEJH1ci/BsGj+qjwwxpSeaNa5EpUm2ONYuKfINFXQtTsAX4 GNqqsKxPRoQYWn8oohvRFgBQPYqFEsH8mBxoxLjYwDnbMSMDS9zaSto0B2mT8po2uB6ZX1J0iQpZ ... it's longer but you get the picture. Katie -Original Message- From: Berthold Stöger [mailto:[EMAIL PROTECTED] Sent: Thursday, June 29, 2006 1:07 AM To: zope@zope.org Cc: Kate Legere Subject: Re: [Zope] attaching an image to an email Hi, On Wednesday 28 June 2006 22:05, Kate Legere wrote: > > 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. > > > > > > Try: To: to From: from Subject: Art Hi, please take a look at my art and post it if you think it's good enough. Of course this doesn't work if the user uploads a non-jpeg picture therefore some more elaborated code will be needed. HTH ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] attaching an image to an email
Nope, I still don't get the attachment. Katie -Original Message- From: Jonathan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 3:55 PM To: Kate Legere; zope@zope.org Subject: Re: [Zope] attaching an image to an email - Original Message - From: "Kate Legere" <[EMAIL PROTECTED]> To: 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... > > > Attach: > > Send to: > > > My email > > > > > > -- it's handled with sendPic --- > > > 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. > > > > > > > Your image was sent. > > > - 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 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] attaching an image to an email
On 6/28/06, Kate Legere <[EMAIL PROTECTED]> wrote: I'm writing a form which allows the user to send an image attachment with their email... Attach: Send to: My email -- it's handled with sendPic --- 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. Your image was sent. - 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? when you decode('base64') this string you get '\n ' which means, that you have to find out, which method or attribute of FileUpload gives you the actual data. (what you got is FileUpload.__repr__() or __str__()) --knitti ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] attaching an image to an email
- Original Message - From: "Kate Legere" <[EMAIL PROTECTED]> To: 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... Attach: Send to: My email -- it's handled with sendPic --- 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. Your image was sent. - 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 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )