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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

email file and show content of file on email

Status
Not open for further replies.

gogo36

Programmer
Jun 3, 2005
7
US
I want to email a file from a dir and also show the content of the file in the body of the email. Can someone help?

Thanks,
Rookie
 
If yo just want the file to be the contents of the email then
Code:
mail -s "Subject line" me@myserver < file
will do fine.

However, after that it gets more complex. In particular it depends if sendmail has been configured. Additionally, if you want to send the file as an attachment you need to look at uuencode. Try a search on this forum and the General Unix Discussion forum

On the internet no one knows you're a dog

Columb Healy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top