LinuxCommandLibrary

mpack

TLDR

Encode file as MIME

$ mpack -o [output.mime] [file]
copy
Encode and mail
$ mpack -s "[Subject]" [file] [user@example.com]
copy
Encode to stdout
$ mpack -o - [file]
copy
Split large file
$ mpack -s "[Subject]" -c [100000] [large_file] [user@example.com]
copy

SYNOPSIS

mpack [options] file [address...]

DESCRIPTION

mpack encodes files into MIME format for email transmission. It handles binary files by encoding them as base64 and generating proper MIME headers.
mpack can send encoded files directly via email or save them to files for later transmission.

PARAMETERS

-s subject

Email subject.
-d description
Content description.
-c size
Split size in bytes.
-o file
Output file (or - for stdout).
-m type
MIME content type.

EXAMPLE

$ # Encode and email PDF
mpack -s "Report" report.pdf user@example.com

# Encode to file
mpack -o report.mime report.pdf

# Split large file
mpack -s "Large File" -c 1000000 bigfile.zip user@example.com
copy

CAVEATS

Companion to munpack. May require configured mail system. Large files should be split. Some encodings deprecated.

HISTORY

mpack was written by John G. Myers at Carnegie Mellon as part of the MIME tools for handling binary email attachments.

SEE ALSO

munpack(1), uuencode(1), base64(1), sendmail(1)

Copied to clipboard