Mailing Linux Terminal Help

Status
Not open for further replies.

scorpio

Baseband Member
Messages
90
Is there a way to use the "mail" in the Linux terminal and not have it ask for body text? I figured out how that "mail (person) -s 'subject'" would do the subject in the first line, but is there a way to do this for the body text?
 
If you have the message body in a file you can do
Code:
$ mail -s test philip < message.txt
or
Code:
$ cat message.txt | mail -s test philip
if you have no message to give someone you can simply do
Code:
$ echo | mail -s test philip
 
Do you know how to attach a file? I keep using "~r filename" but all it does is say that in the subject of the email.

Thanks.
 
Code:
mail -s Hello -a /path/to/attachment.txt [email]user@somewhere.com[/email]
To view the full range of options and functions of mail, type:
Code:
man mail
 
Wouldn't have thought so, you should either tar the directory and send the tarball or send each file in the directory which is too tedious for my liking
 
Status
Not open for further replies.
Back
Top Bottom