By default, Elastix comes with Cyrus-IMAP and Postfix pre-configured. If we log into the Elastix console, we can send an e-mail to a valid e-mail address in order to check the availability of this program. This command is useful when setting up the e-mail service.
To send an e-mail by using the console, just type mail -s "Hello world" [email protected]
.
Remember that Hello world is the subject of the e-mail. After pressing the Enter key, a new line will be displayed. Here, we can type the body of the message. To exit this function, we press Ctrl + D. The command prompt will ask us if we want to send a copy of the mail to any other address, then we press Ctrl + D again.
If we want to do this in one line, we type echo "Message (body the email)." | mail -s "Hello world" [email protected]
.