Mailx works more like the mutt command and it it also a part of mailutils (On Debian) package. Read more about Mutt – A Command Line Email Client to Send Mails from Terminal 3. $ echo "Message Body Here" | mutt -s "Subject Here" -a backup.zip You can send an email with attachment using the mutt command below. If you do not have it on your system, type the command below to install it: $ sudo apt-get install mutt Mutt is a popular, lightweight command line email client for Linux. You can as well send an existing message from a file as follows: $ mail -s "Subject here" -t -A backup.zip < message.txt $ echo "Message Body Here" | mail -s "Subject Here" -A backup.zip Now its time to send an email attachment using mail command a shown. Mail is part of the mailutils (On Debian) and mailx (On RedHat) package and it is used to process messages on the command line. Below are the various, well known methods of sending email with attachment from the terminal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |