email socket closing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    email socket closing

    A class I use (phpmailer) succesfully opens a mail socket.
    [PHP]fsockopen(xxxx. XXXXXXXXXX.co.u k,25,$errno,$er rmsg,10)[/PHP]
    Code:
    Succesfully connected to fsockopen with smtp_conn Resource id #18 
    host of the server xxxx.XXXXXXXXXX.co.uk 
    the port to use 25 
    error number if any 0 
    error message if any 
    return value 10
    immediately afterwards if I check the socket
    [PHP]$sock_status = socket_get_stat us($this->smtp_conn);
    print_r($sock_s tatus);[/PHP]I get the following
    Code:
    sock_status Array ( [stream_type] => tcp_socket [mode] => r+ 
        [unread_bytes] => 0 [seekable] => [timed_out] => [blocked] => 1 [eof] => 1 )
    My question is does the 'EOF' and '0 unread bytes' mean the connection has closed
    because the writer of the class thinks so.
    The email has worked fine for two years but started to fail yesterday
    because the 'EOF' is returning '1'
    I have no idea what was being returned before because I have just used this class blindly with great success.
    Anybody know what is happening?
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    After a heated discussion with our host provider the connection is no longer closing.

    But while we are here can anybody explain how a socket can return 'EOF'
    I know a socket and a file are basically the same, but where does 'eof' come from.
    TA

    Comment

    Working...