*attaching* a file to /usr/bin/mail message
Giorgos Keramidas
keramida at ceid.upatras.gr
Sat Apr 2 04:47:59 PST 2005
On 2005-04-02 14:08, "Colin J. Raven" <colin at kenmore.kozy-kabin.nl> wrote:
> Does anyone happen to know how you would *attach* *not readin the
> contents of, but actually *attach*) a file using /usr/bin/mail?
Not very easily, is one answer. You can probably get away with uuencode
output filtered to the standard input of mail(1), but that's not really
a "MIME attachment".
> On my system mail has no "-a" (attach) flag, and some Googling told me
> mailx might solve the problem, but /usr/bin/mailx just invokes mail....
Other mail user agents do have a -a flag though. At least mail/mutt
does and I've used it successfully in the past. If you are not stuck
with mail(1) only, you can always use mutt for this.
mutt -a /path/to/file recipient.address at example.net
More information about the freebsd-questions
mailing list