Michael C. Toren on Mon, 9 Aug 1999 17:04:37 -0400 (EDT)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [Plug] Mailing attachments from command line

  • From: "Michael C. Toren" <mct@netaxs.com>
  • To: Philadelphia Linux Users Group <plug@lists.nothinbut.net>
  • Subject: Re: [Plug] Mailing attachments from command line
  • Date: Mon, 9 Aug 1999 17:04:30 -0400 (EDT)

> Is there anyway to attach a document to a mail message from the command
> line?  I guess it would be easy for a text file:
> 
> echo "attachment.txt" > mail username

Incidentally, the above line probably doesn't do what you intended; it
would place the literal string "attachment.txt" into a file named "mail",
overwriting it's previous contents if it already existed.

To mail a user the contents of a text file, try:

	mail -s "Desired subject line" username < attachment.txt

-mct