49 users online (1 members and 48 guests)  


  Results 1 to 4 of 4
  1. #1
    VirtualOdin's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Location
    London, England
    Posts
    3

    Help with imap_open please

    I am trying to automate a process whereby people send an email to one of my CWH mailboxes with the information I need pre-formatted, then I extract the messages from the mailbox via a simple PHP script, extract the information and save it to a database.

    I cannot make it work after many happy attempts at different permutations. It keeps stopping at the imap_open command as follows:

    $mbox = imap_open ("{mail.mydomain:110/pop3}INBOX", "accountname", "password");

    Can anyone advise on where I am going wrong, please?

    Tim

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    Re: Help with imap_open please

    Hiya,

    What error does it give you?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    krishnakumar's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2005
    Posts
    1

    Re: Help with imap_open please

    Hello,

    I am getting the following error when trying to pop mails using the fuction imap_open.

    ***************
    Warning: Couldn't open stream {localhost:110/pop3/nntp}/var/spool/mail/krishna in /var/www/html/helpdesktest/kk.php on line 2
    hello
    ***************

    Here is my php code

    ***************
    <?php
    $mbox = imap_open ('{localhost:110/pop3/nntp}/var/spool/mail/krishna','krishna', 'krishna');
    $err=imap_errors();
    for ($i=0;$i<count($err);$i++)
    echo $err[$i];

    echo "hello";
    ?>
    ***************

    I hope that I will get a fast response.

    Thank you.
    Krishnakumar

  4. #4
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: Help with imap_open please

    well, you cannot execute code in a single quoted phrase:

    '{localhost:110/pop3/nntp}...' <-- that will not work, try putting it in dubble quotes, or if you can hard code it in do that.



Tags for this Thread