Install mail package first.
Send mail from server:
echo "This is a test." | mail -s Test user@example.com