How do I check whether mail sending is working on a server?

apt-get install mailutils
echo "E-mail test" | mail -s "Test mail" dfediuk@gmail.com