Sending an e-mail message from the command line

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.

How to do it…

To send an e-mail by using the console, just type mail -s "Hello world" user@email-domain.com.

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.

There is more… ...

Get Elastix Unified Communications Server Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.