Search code examples
phporacle-databasephpmailermail-server

How to make connection With mail server in oracle PHP?


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.


Solution

  • 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";
    }