Stooney Posted October 12, 2008 Share Posted October 12, 2008 Is it possible to find whether or not there is a working smtp server setup with the current installation? Basically I'm working on a script which at some point attempts to mail(). I want to make something like: if(smtp works){ mail(); } else{ no mail; } (Of course not quite like that, that's just the idea) Link to comment https://forums.phpfreaks.com/topic/128051-determine-smtp-status/ Share on other sites More sharing options...
micmania1 Posted October 12, 2008 Share Posted October 12, 2008 $host = 'hotmail.co.uk'; if (checkdnsrr($host, "MX")) { mail(); } else { echo 'No Mail server.'; } Link to comment https://forums.phpfreaks.com/topic/128051-determine-smtp-status/#findComment-663272 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.