Reputation: 105
i have my own mail server with IP,Host,Username,Password. So i want to make connection with my mail server for just check mail server is active or not. please suggest me tutorial. Thanks in Advance.
Upvotes: 0
Views: 46
Reputation: 999
If you simply want to check it the mail server is active, use the fsockopen function :
$fp = fsockopen("10.0.0.1", 25, $errno, $errstr, 15);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
}else{
echo "Mail Server is active";
}
Upvotes: 1