mail – v email address
sub : test
mail -s “some subject” [email protected]
Once you execute this it will give you a blank space where you can insert the text for your e-mail.
When you finish writing the e-mail you can stop the input mode with the key combination CTRL + D.
As soon as you press CTRL + D it will ask you for Cc:. If you want to send the e-mail to more than one recepient you can use this field and add the second e-mail address.
Note: You can add more than one e-mail address in the Cc: field separated by comma.
Here is an example:
Sending text file as an e-mail:
It is pretty simple to send a text file to your e-mail over the mail command.
Here is example
mail -s “some subject” [email protected] < /path/to/file
-bash: mail: command not found
yum install mail –> No package mail available.
You should run :
yum install mailx
mail [email protected] is working now