Send Grid gateway not working on my-server SMTP connection fail

I Have just migrate my server from my development to AWS sever and tried all is working fine or not. So when I go to Email setting and set all setting with port 587 or 25 and host smtp.sendgrid.net and my user name of send grid and password it gives me SMTP connection fail. But When I am connect email setting with gmail server with port 465 and user name password of the gmail it working fine ? any thing wrong with server setting

Try to use ssl://smtp.sendgrid.net instead of smtp.sendgrid.net. Make sure you use port 465 and SSL is selected

Alx