POP3 mail problem

Discussion in 'PHP' started by suitsubetter, Nov 2, 2005.

  1. #1
    Hi!

    I am setting up an autoresponder system that checks a certain email account. However I get these errormessages when testing the system. Anyone have a clue?

    Warning: imap_open(): Couldn't open stream {mail.successmaster.com :110/pop3}coaching@successmaster.com in /home/entersuk/public_html/inf_resp/mailchecker.php on line 54

    Warning: imap_headers(): supplied argument is not a valid imap resource in /home/entersuk/public_html/inf_resp/mailchecker.php on line 58

    Warning: imap_expunge(): supplied argument is not a valid imap resource in /home/entersuk/public_html/inf_resp/mailchecker.php on line 208

    Warning: imap_close(): supplied argument is not a valid imap resource in /home/entersuk/public_html/inf_resp/mailchecker.php on line 209
     
    suitsubetter, Nov 2, 2005 IP
  2. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you from your server connect to the pop3 mailbox and login?

    Commands are like this:

    telnet mail.successmaster.com 110
    > +OK
    USER
    > +OK
    PASS yourpasswd
    > +OK
    LIST
    QUIT


    Just use your login/password ofcouse. - just to check that there isn't a network problem keeping you from accessing it.
     
    blinxdk, Nov 2, 2005 IP
  3. suitsubetter

    suitsubetter Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, it works... That's why I cannot see what is wrong..

    +OK POP3 host [cppop 20.0] at [69.16.196.124]
    USER coaching@mydomain.com
    +OK Need a password
    PASS MYPASS
    +OK You have 0 messages totaling 0 octets from /home/entersuk/mail/entersuksess.
    no/coaching/inbox (full load)
     
    suitsubetter, Nov 2, 2005 IP
  4. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hmm.. bit weird, this works fine for me:

    $mymail = imap_open ("{localhost:110/pop3}INBOX", "user@mydomain.dk", "mypass")

    You might want to try adding notls, like this:
    imap_open ("{localhost:110/pop3/notls}INBOX", "user@mydomain.dk", "mypass")

    It seems some people have success with that. Else try and paste your code.
     
    blinxdk, Nov 2, 2005 IP
  5. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Oh.. also if you have whitespace in your string - it looks like that from: {mail.successmaster.com :110/pop3} - then remove that.

    (between .com and :)
     
    blinxdk, Nov 2, 2005 IP
  6. suitsubetter

    suitsubetter Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This is the code:

    $conn = imap_open("\{$DB_POP3_host:$DB_POP3_port/$mailtype}$DB_POP3_mailbox", $DB_POP3_username, $DB_POP3_password);
     
    suitsubetter, Nov 2, 2005 IP
  7. suitsubetter

    suitsubetter Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    The "notls" did not work by the way.. and there does not seem to be any whitespace...

    Warning: imap_open(): Couldn't open stream {mail.mydomain.com:110/pop3/notls}coaching@mydomain.com in /home/entersuk/public_html/inf_resp/mailchecker.php on line 55
     
    suitsubetter, Nov 2, 2005 IP
  8. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Try and remove the backslash before {$DB_POP3_host
     
    blinxdk, Nov 2, 2005 IP
  9. suitsubetter

    suitsubetter Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    This is weird. When I set up the system manually with no variables and remove the \ as you suggested, then it seems to be working. When the variables are there, the \ must be there or else I get this error: Parse error:

    parse error, unexpected ':', expecting '}' in /home/entersuk/public_html/inf_resp/mailchecker.php on line 55

    Now, how to make this work with variables... hm.
     
    suitsubetter, Nov 2, 2005 IP
  10. suitsubetter

    suitsubetter Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thanx for your help. Now everything works!!
     
    suitsubetter, Nov 2, 2005 IP