Hi Abeer Hayat Khan •
Welcome to Microsoft Q&A forum.
As I understand, you are unable to ping email server from sql machine.
Please refer to the below discussions over similar issue if that could help:
https://stackoverflow.com/questions/9490900/able-to-ping-remote-server-yet-unable-to-connect
https://dba.stackexchange.com/questions/104315/cant-connect-to-remote-sql-server-from-some-machines
If the solutions mentioned in above posts don't help, I would recommend you to please file a support ticket for deeper investigation and in case if you don't have a support plan, do let us know here so that we can check on other options to unblock you.
Thanks