View Full Version : [all variants] Send files to mail from console
April 29th, 2008, 06:37 PM
In a near time ago, I saw some linux package (do not remember exactly the name) wich could send files to an e-mail from console.
Is there anything similar in Ubuntu Server ?
Note: I'm use Ubuntu Server Gutsy Gibbon 7.10.
April 29th, 2008, 08:35 PM
I just use the command line:
cat /file.txt | mail -s 'subject' email@example.com
I use this in scripts to monitor my server.
April 30th, 2008, 12:50 PM
Thanks for reply me cdtech. I have 2 additional questions:
1) Do I need to set an e-mail server on the machine to sendo e-mails? Is there a way to use a 'fake' SMTP server (like freeSMTP Server for Windows)?
2) This tip you sent me is helpfull on administration, and is very worth for me. But I need to send other files too, like "tar.bz2" archives. How can I do it?
Thanks in advance!
April 30th, 2008, 01:52 PM
I just install Postfix and mailutils and then I can send mail from the console.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.