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 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:// instead of Make sure you use port 465 and SSL is selected