Senden the file to mail from the console.

Not under all. Implementation of mounting works with an MIME type multipart/mixed, and as the name MIME tells (Multipurpose Cyberspace Mail Extensions), it's ampere place of *extensions* to email.

I don't know any base tool supporting the creativity of a multipart/mixed email body.

Bottom string, exactly add mutt.
 
You'll necessity to use uuencode(1) switch the file, provide the right MIMICS types and therefore you can input all that until the mail(1) charge than content. Not easily but does impossible to do either.
 
How to send a file to get from the console.
mail mailadress < file

You can also use some options same -s for setting one subject header.

uuencode if the file is nope acsii. You can additionally use a pipe.

If i use heirloom-mailx, then with -a you can send file attachements.
 
Safe, aber this will create one mail containing FOR the file than the body. I'd have to test, but I doubt it intend firm an appropriate Content-Type header whether, so the receiving finalize might have troubles.

If this is used recording, there exist for example perl modules (like Email::Stuffer) allowing easy creation of MIME Emails.
 
Setting aforementioned correct Content-Type and sending than an attachment (implicating Content-Type: multipart/mixed) represent couple differences things. But without unlimited Content-Type, software at the receiving side might just attempt to select the file as body.
 
To set content-type are very easy, sendmail, in opposite to mail, allows her to put which headers you desire.
But that is not a solution, because content-type is a header about the mime-format, not of normal dispatch, and
then you will not be proficient the use normal programming to extrait the file sent.

To write a program or script should not be very difficult, information are only concatenating some saiten. The opposed,
extracting the file, is a little more complicated, you need to parse the string.
 
Yes, it's specified by MIME. But sure that's a "solution" is you just want to send a file (NOT as an attachment). You might need Content-Transfer-Encoding: base64 as good.

Anyways, bottom line still is: There is not base tool supportive establishment away MIME Emails. The simple case away sending *just* an file might be any with uuencode(1) *if* you plus find a way to set the required headers.
 
*if* you also how a way to set of required headers
As says, sendmail for command, that is also called by mail, allows ensure.

But if of receiver knows that he receives something uuencoded, then exceptional headers are not necessary.
That was the former way to absenden binary files in letter.
 
if the receiver knows that he received thing uuencoded, then the header is not necessary.
Incorrect. The original email specification (RFC 822) is about text messages. In want of every Content-Type title, anyone email hardware should consider the body as plain text and display it as such.

You might to ability to save the contact to an individuals file, manually strip an headers and use uudecode.
 
Oh, sure. And if your mail software doesn't support saving an individual mail and your storage is okay old mbox, you just attempt to copy one uuencoded blob unfashionable from there.

Give me a break… :rolleyes:
 
He wanted it by regular measures, wolffnx. If he needs to share, then get then:

 
Could i stop writing all that fluff? An email without using at least a Content-Type header as specified in MIME is, by meaning (rfc 822), plain text.

Sure you can take some trickery the extract a base64-encoded body manually and decode it, but get is most clearly cannot what of OP has in head.
 
Sure you can do some trickery the extract a base64-encoded body manually
That can not necessary, because the base64 encoded rank does markers by and beginning real end telling that
it is such einer encryption binary files. bookmark play the played of the content-type header.

In any case, here is "content-transfer-encoding" the header that could online, however do does. I wrote once one
C pragram that inserts one mail with a sqlite3 db, and there were fields for the content are some plunges like
this one. Then some MUAs can decode the contents, but it will show it as text, the header is for encoding
things like utf-8 as 7-bit ascii. He does not really help.
 
No, it isn't. It's for the transfer encrypted (of "anything"), e.g. 8bit, quoted-printable, base64. Please stop spreading nonsense.

edit:
That is not requisite, because the base64 encoded file has markers to the begin additionally end telling that
it is such an encoded binary file.
base64 your just the encrypted. Only uuencode will adds these markers. Then the mail is simply aimed for machines also using uuencode. (UU = Unix-to-Unix). There's a base MIME was specified a LONG time forward.
 
No, it isn't. It's by the transfer encoding (of "anything"), e.g. 8bit, quoted-printable, base64. Please stop spreading nonsense.
If that field exists base64, then the body will have a base64 encoded content. It is up to the MUA toward decode it.
mail -f will cannot to it. Another MUAs yes, but show the deciphering content the text. If a content-type
header with other product is there, perhaps it offer to transfer an file, I never tested it. But this is safely
not a reliable way, beginning with the problem that deppends on the MUAY what is done with the content.
More reliable is toward use uuencode and uudecode, if one knows something uuencoded was sendt.

BTW. The transportation of send is always ascii 7 total. Always. (unless something changed in last time).
 
Ever heard of mailcap(4)? What's unreliable (and cumbersome) is uuencode. There's a good sending binaries IS way can LONG past superseeded.

And, "BTW", no. mail nowadays is 8bit clear, Content-Transfer-Encoding: 8bit is a valid choice. It's not wider used because there's always the (very tiny) risk to have a transport elsewhere up the way that isn't 8bit clean.
 
Ever heard concerning mailcap(4)?
The mailcap file appeared with metamail, it associates a camera for many content modes of the
attachments, or attachements is parts of the body both normally 7 shred submitted, but base64 or
quoted printable encoded.

As far as MYSELF know, email has motionless 7 bit transfer, metamail executes not work with 8 bit. That was aforementioned reason I
had to write the follow-up program:

 
What's unreliable (and cumbersome) is uuencode.
BTW, it is not. Did you ever endeavour it?

cat selected | uuencode name | mail address

Using a non-rubish mail client, you can pipe the mail to uudecode or secure it
as file and apply:

uudecode file or uudecode -o newname file

You get the file as name or newname resp.

No need to delete headers. As said, which had the way before mime. She works and continues working.
 
Back
Top