Send Mail With Attachments From the Linux CLI

A quick snippet:

uuencode path-to-file name-of-attachment | mail -s Subject example@example.com

It’s probably better to use MIME than uuencode. Commands like mutt -a or mailx -a will do this for you, but these are not always available.

Advertisements
Send Mail With Attachments From the Linux CLI

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