Search Posts

Send Email Attachment from Linux Command Line

Now its time to send an email attachment using mail command a shown.

$ echo "Message Body Here" | mail -s "Subject Here" user@example.com -A backup.zip

In the above command, the flag:

  1. -s – specifies the message subject.
  2. -A – helps to attach a file.