Tuesday, November 18, 2008

Send attachments via mail command

At some point of our daily tasks, we come across a scenario where we would prefer to be able to send the attachments via mail command in Linux or Solaris. Here is a quick way to do that:-

# uuencode abc.txt abc.txt | mail -s "subject" email.address@domain.com

uuencode is a utility which is available in sharutils rpm for Linux or as a package in Solaris.

This is a quick/easy way in order for sending attachments. You might want to consider mutt, mpack etc. for advance options but again I like to keep things as simple as possible ;).

Enjoy!!
Rahul.

2 comments:

Anonymous said...

Nice Informative Post !!

www.cbtvideotutorials.blogspot.com

Anonymous said...

Nice Post !!

www.freesoftwareloot.blogspot.com