Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mailx or sendmail command

Status
Not open for further replies.

yy2

MIS
May 3, 2006
10
0
0
US
Can anyone provide the command how to send a text file as a attachment with a proper subject using mailx or sendmail command in UNIX.

Note: I am using HP-UX OS. The file send should be the attachment, not in the message body. In addition, I need to put in the mail subject as well.



Thanks.
 
And what about the man command ?
man mailx
man sendmail

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
You can send mail using mail command in unix console by simply piping file content to this command.

Eg. cat textfile | mail -s "Subject" receipent_mail_address

for example

cat /etc/password | mail -s "my Password file" liquidbrain@mail.com :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top