You can test if the sendmail application is installed and working correctly.

If you go on and see the message with “Hello world” then is working.

The mail command allows you to send emails from Linux terminals and to make some tricks for you.

Let’s see some of these options.

Let’s see how you can put some text in body message of the email.

You will find an email on your account named you@mail.com.

This message will have the title: test this mail and a body: body message.

If you want to mail to read the content from a file, then:

This will send one message with the content of test.log.

Why do we need to send emails from the terminal?

The first reason is the need to send logos and outputs of some commands.

Here is an edifying example:

Also, you can create some bash scripts. See below:

And such examples could continue.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.