Hello, please check if your server can connect to port 25 of gmail? If not, maybe your server does not allow connections to port 25 of other servers.
If you cannot connect to port 25 of other servers, you cannot send emails.
CentOS:
yum install telnet -y && telnet gmail-smtp-in.l.google.com 25
debian/ubuntu:
apt install telnet -y && telnet gmail-smtp-in.l.google.com 25
aaP_pancadewa