How to send an email via CLI Interface on Free PBX Servers

Using an SSH tool, such as putty.exe:

SSH into the fully qualified server name or IP address of the FreePBX server you are testing and login as the root account.

Type the following commands:

 

Sending Email from CLI
  1. sudo -u asterisk mail -s test1 This email address is being protected from spambots. You need JavaScript enabled to view it. (hit enter) replace This email address is being protected from spambots. You need JavaScript enabled to view it. with email address to send test email to.
  2. (Type body of message and hit enter)
  3. Ctrl D and hit enter.