SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    POP3 and IMAP connections

    Alright...

    I give up, I looked through the documentation and examples but I Can't find anything that helps me. I am trying to connect to a POP account on my server at example@mplionhearts.com. How do I connect to this account? I can connect to mail.mplionhearts.com but I think that is either all of my accounts or my default account. What address would I use for example@mplionhearts.com?

    Thanks!
    ]

  2. #2
    SitePoint Enthusiast Panda Coder's Avatar
    Join Date
    Nov 2005
    Location
    Tarifa, Spain
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you using imap functions in php code to connect? I have written several scripts to check email accounts so if you could give me a bit more info may be able to help...

    like how you are currently trying to connect...

    Panda

  3. #3
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Currently I've been using imap_open, then for the location I use mail.mplionhearts.com (I had no idea this was going to work) and then for my user and password I use my server stuff. The port was set at 143 I believe but not sure how much that matters.

    The script WAS working, however now when you go to it:

    http://www.mplionhearts.com/test/imapTest.php

    it can't even find it. And yes, the URL is correct. And yes the file is there.

    But anyways, I still need to get it to open certain inboxes, not the one for mplionhe . I need to figure out a way to open the inboxes for all my accounts. Connecting would be the first major step .
    ]

  4. #4
    SitePoint Enthusiast Panda Coder's Avatar
    Join Date
    Nov 2005
    Location
    Tarifa, Spain
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    ok, this is what I use to open my mailbox (best check your mailbox is 'INBOX') and get the number of messages at the start of my script.

    PHP Code:
    $mail_box ="INBOX";
    $email_user "username";
    $email_password "password";

    // the mail server to connect to
    $MAILSERVER="{mail.yourdomain.com:143/imap/notls}$mail_box"//Para IMAP

    $mbox imap_open($MAILSERVER$email_user$email_password);

    $total imap_num_msg($mbox); 
    of course replace the relevant username/password/domain etc.

    any good?

  5. #5
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well yes that works, however I only want the e-mail that goes to webmaster@mplionhearts.com
    ]

  6. #6
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ugh this is pissing me off!

    PHP Code:

    <?php
    $mail_box 
    ="INBOX"
    $email_user "mplionhe"
    $email_password "---"

    // the mail server to connect to 
    $MAILSERVER ="{mail.mplionhearts.com:143}$mail_box"//Para IMAP 

    $mbox imap_open($MAILSERVER$email_user$email_password); 

    $total imap_num_msg($mbox); 

    print 
    $total;
    ?>
    Scripts almost exactly like this use to work, now they don't.

    In fact, the browser wont even aknowledge the existence of the script. Try it for yourself:

    http://www.mplionhearts.com/phptesting/imapTest3.php

    The code above is EXACTLY what is in that file. Any ideas guys?
    ]

  7. #7
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I spent a few hours playing around with this and I give up now. I can't find ar eason why it wont open any scripts with the imap_open function. Even a simple script like the one below won't work. Let me remind you, when I was using this script a few days ago, it worked fine. It should at least appear blank if it can't connect. Do you guys have any explanation to why it would be behaving so weird? I know for a fact that imap functions are enabled.

    PHP Code:
     <?php
        
    print imap_open("{mail.mplionhearts.com:143}INBOX""mplionhe""---");
    ?>
    ]

  8. #8
    SitePoint Addict
    Join Date
    Apr 2005
    Location
    San Diego, CA
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you see anything in your server error logs?
    I study speed waiting. I can wait an entire hour in 10 minutes.

  9. #9
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In my error logs? Nothing but the file does not exist etc.

    How do I access my PHP error logs through Cpanel?
    ]


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •