multipart/mixed
, and as the name MIME tells (Multipurpose Internet Mail Extensions), it's a set of *extensions* to email.multipart/mixed
email body.How to send a file to mail from the console.
mail mailadress < file
Content-Type
header either, so the receiving end might have troubles.Content-Transfer-Encoding: base64
as well.As said,*if* you also find a way to set the required headers
sendmail
as command, that is also called by mail
, allows that.Wrong. The original email specification (RFC 822) is about text messages. In absence of anyif the receiver knows that he received something uuencoded, then the header is not necessary.
Content-Type
header, any email software should consider the body as plain text and display it as such. uudecode
.Right, and hence it is not wrong what I said.You might be able to save the email to an individual file, manually strip the headers and useuudecode
.
This worked withAnd if your mail software doesn't support saving an individual mail
mail
and mbox format, and sure will continue working.That software is then rubbish.And if your mail software doesn't support saving an individual mail
Content-Type
header as specified in MIME is, by definition (rfc 822), plain text.That is not necessary, because the base64 encoded file has markers at the beginning and end telling thatSure you can do some trickery to extract a base64-encoded body manually
base64 is just the encoding. Only uuencode will add these markers. Then the mail is only intended for machines also using uuencode. (UU = Unix-to-Unix). There's a reason MIME was specified a LONG time ago.That is not necessary, because the base64 encoded file has markers at the beginning and end telling that
it is such an encoded binary file.
If that field is base64, then the body will have a base64 encoded content. It is up to the MUA to decode it.No, it isn't. It's for the transfer encoding (of "anything"), e.g. 8bit, quoted-printable, base64. Please stop spreading nonsense.
mail -f
will not do it. Other MUAs yes, but show the decoded content as text. If a content-typeContent-Transfer-Encoding: 8bit
is a valid choice. It's not widely used because there's always the (very tiny) risk to have a transport somewhere on the way that isn't 8bit clean.The mailcap file appeared with metamail, it associates a viewer for many content types of theEver heard of mailcap(4)?
BTW, it is not. Did you ever try it?What's unreliable (and cumbersome) is uuencode.
cat filename | uuencode name | mail address
uudecode
or save it uudecode file
or uudecode -o newname file