Laravel check if mail server is up

I’m working on a Laravel application and I want to know if there is a way to check that the mail server is up and running normally. Is there any way to maybe ping the server? The only way I can think of is to simply send an email and check if the email was sent or failed. This however could end up easily spamming the inbox with each time the mail server is checked.