Yarn Makes bad MIME attachments

From: Howard Schwartz (theo@ncal.verio.com)
Date: Mon, 24 Jan 2000 15:14:26 -0800 (PST)

I wonder if previous posts have pointed out an obvious deficiency
in the way yarn creates MIME encoded attachments? If you select
``attachment'' when you send some mail, and fill out yarn's resulting
dialogue box, yarn asks you for a file name and a description.

In the header for your attachment yarn then puts:

Content-Type: application/octet-stream; name="filename"

In principle this is only correct for attachments that are
executable programs.

However, what if your attachment is a sound
file or a Jpeg image? Well, some receiving software will get it
right since it will either store the attachment as a separate
file or execute the attachment, as if you had ``double clicked it''.
If your filename happened to already have the correct suffix (e.g.,
filename.jpeg), and the receiving environment associates the suffix,
``jped'' with an appropriate image viewer -- your lucky mail recipient
will get to see your picture.

However, that is a lot of ifs. In general, you want the Content-Type:
line to indicate the type of file your attachment really is, for instance,
image/jpeg; you want the filename to have the appropriate suffix, for
instance, filename.jpeg; and you would like an extra header line included
for the filename such as this:

Content-Disposition: attachment; filename=filename.jpeg

If you did the previous, you could be reasonably sure that most
current mail clients will do with right thing with your attachments.
However, to do these things in yarn, you will have to manually alter
MIME header lines or add them yourself in yarn outgoing messages.