smtp problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • russgri

    #1

    smtp problems

    I am on cpanel22.
    I am trying to configure a script to send email via smtp for email notification when someone uploads a file.

    Here is the error message:
    Code:
    Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/hostfoxw/public_html/dailydraw/phpmailer/class.smtp.php on line 105
    
    Warning: fsockopen(): unable to connect to smtp:25 in /home/hostfoxw/public_html/dailydraw/phpmailer/class.smtp.php on line 105

    What are the Variable values for the following code.
    Code:
    #connect to the smtp server
            $this->smtp_conn = fsockopen($host,    # the host of the server
                                         $port,    # the port to use
                                         $errno,   # error number if any
                                         $errstr,  # error message if any
                                         $tval);   # give up after ? secs
            # verify we connected properly
            if(empty($this->smtp_conn)) {
                $this->error = array("error" => "Failed to connect to server",
                                     "errno" => $errno,
                                     "errstr" => $errstr);
                if($this->do_debug >= 1) {
                    echo "SMTP -> ERROR: " . $this->error["error"] .
                             ": $errstr ($errno)" . $this->CRLF;
                }
                return false;
            }
    Here is class.smtp.php.txt
    Thanks..
  • Jonathan
    Senior Member
    • Mar 2004
    • 1229

    #2
    I'm not good, hell I don't know any SMTP in PHP...
    But why not simply use PHP's mail() function to do this??
    "How can someone be so distracted yet so focused?"
    - C

    Comment

    Working...