Sending email attachments from linux command line

Many times we required to send mail attachments from command line, when administering a server remotely. The procedure is simple using mutt that is available in all Unix flavors and Windows Microsoft.

$ mutt -s “Logs” -a http_access.log nikesh@domain.com

Or Without subject:

$ echo | mutt -a [file] [mail@address.com]

Mutt website: http://www.mutt.org/.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s