MIME part header (was: SMTP headers)

Frank Ellermann <[email protected]>
Newsgroups gmane.ietf.rfc822
Organization <URL:http://purl.net/xyzzy>
Message-ID <[email protected]>
[email protected] wrote:

> I have noticed that the former sends "attachment" headers
> which don't contain the attachments' contents :
 
> ...
> --------14507F4DC80F4D6511158149340B40B01
> Content-Disposition: attachment; filename="test.txt"
> Content-Transfer-Encoding: 7bit
> 
> Content-Type: Text/Plain
> 
> --------14507F4DC80F4D6511158149340B40B01
> ...

Sounds like a bug, for starters there should be no empty line
before the Content-Type.  

> --------14507F4DC80F4D6511158149340B40B01
> Content-Disposition: attachment; filename="test.txt"
> Content-Transfer-Encoding: 7bit
> 
> Content-Type: Text/Plain
> 
> This is the contents of the file
> --------14507F4DC80F4D6511158149340B40B01

Same issue here, but you said it works for you, so maybe the
bogus empty line is a problem with your UA.
 
> Does anyone know how to force RTEs or MTAs such as sendmail
> to send "attachment" headers of the second kind?

For a plain text US-ASCII part you generally need no header
fields at all (for the default inline disposition).  As you
said you want it as attachment, the minimal header would be:

--------14507F4DC80F4D6511158149340B40B01
Content-Disposition: attachment; filename="test.txt"
 
This is the contents of the file
--------14507F4DC80F4D6511158149340B40B01
Content-Disposition: attachment; filename="verbose.txt"
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
 
This is another file after a more verbose header
--------14507F4DC80F4D6511158149340B40B01

Frank
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.