first of all, check whether the port 25 is open using command
telnet <IP>:25 .
also check if the service is running and binded on port 25 using
netstat -ntlp|grep :25
if postfix is not installed you can use
ee stack install --postfix
if all the above conditions met and still issue is there, try sending mail from command line using
(you may need to install mail utilities using.
apt install mailutils)
and check whether the mail is delivered or not.
To debug further, check mail queue using
and also you may check the logs for better idea.
tail -f /var/log/mail.log