my PHP page currently doesnot have a mail server, instead of throwing an error, is it possible to catch this error and print it out to the user?
this is what I have so far, it just gives an error.
<?php
$foo = mail('test@test.com', 'subject', 'message');
if ( $foo == false )
{
echo "no mail server";
}
?>
thanks!
You could open a port to the mail server in question using fsockopen(‘servername/ipaddres’, 25); If it returns content, it means the port is open and that you could ASSUME that there is a mail server.
This is by all means very experimental, you need to involve yourself in more work but it should get you started 🙂