Re: Generating zipped or gzipped attachment with email package?

Oleg Broytmann <[email protected]>
Newsgroups gmane.comp.python.mime.devel
Message-ID <[email protected]>
On Thu, May 21, 2009 at 01:08:07PM -0500, [email protected] wrote:
>     Oleg>    Sorry, it is for web. So it seems you need
>     Oleg> Content-Type: application/x-gzip
> 
> Alas, then I lose the notion that the file is actually text/csv.  For
> example, how would Outlook or Thunderbird know to open such a file in Excel
> or OpenOffice Calc?

   I think it unzips and then guesses the filetype of the unzipped file.
Guessing is a widely deploying trick in software, alas.
   Web headers are better in this regard as there are separate
Content-Type and Content-Encoding headers. In email, there is a
Content-Transfer-Encoding header but it has a different meaning - it is
either 8bit, or base64, or quoted-printable - it's the transfer encoding
*after* the file has been (g)zipped.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [email protected]
           Programmers don't die, they just GOSUB without RETURN.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.