Go Back   HostGator Peer Support Forums > Public Forums > Pre-Sales Questions

Notices

Reply
 
Thread Tools
  #1  
Old 03-10-2004, 01:36 PM
jspector jspector is offline
Hatchling Croc
 
Join Date: Mar 2004
Posts: 1
Default

I am using this code to attempt to open my mailbox:

$mbx = imap_open("{69.93.86.2:2095/pop3}INBOX",$acct,$pw);

The script chugs away and eventually times out. Does anyone know the proper host string to use when connecting to a hostgator mailbox?

I have gotten this to work on other servers, but it's always a lengthy trail and error process and all I'm getting is errors.

Thanks,
Jonathan
Reply With Quote
  #2  
Old 08-05-2006, 09:56 PM
kmadill kmadill is offline
Hatchling Croc
 
Join Date: Aug 2006
Posts: 1
Default Re: PHP imap_open() host?

Does anyone know the answer to this?
Reply With Quote
  #3  
Old 10-31-2010, 06:25 AM
Ruben.cc Ruben.cc is offline
Hatchling Croc
 
Join Date: Oct 2010
Posts: 1
Default Re: PHP imap_open() host?

6 and 4 years after the above posts, none is probably in need for the answer anymore, but just in case someone bumps onto this topic after a search (like me) and still looking for the answer... I finally got it to work in PHP using this:

imap_open("{localhost:143/notls}INBOX", "username@domain.tld", "your_password")

The above is for accessing it like IMAP, POP will probably work too, didn't test that.
Reply With Quote
  #4  
Old 11-01-2010, 09:03 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: PHP imap_open() host?

do yea one better:
PHP Code:
<?php

function imap_purge($IP,$user,$pass,$mode){


    
$mbox = @imap_open("{".$IP.":143}"$user$pass);

if(
$mbox){
    
$folders imap_listmailbox($mbox"{".$IP.":143}""*");
    echo 
"<h1>Headers in INBOX for $user</h1>\n";
    for (
$i 1$i <= imap_num_msg($mbox); $i++){

        
$header imap_headerinfo($mbox$i8080);
        
$subject$header->fetchsubject;
        
$date $header->udate;

        
$udate=time();

        
//number of days to purge after
        
$purge_after 120;

        
$messageBody imap_body($mbox$i);

        
$age = ($udate $date)/86400;
        echo  
$i.") ".$subject." - Age: ".number_format($age,0)."<br>";

        if(
$age $purge_after and $mode == "A"){
            
imap_delete($mbox$i);
            echo 
"Delete old message $i<br>";
        

        }

        
        
//delete all spam, even if new.
        
if(strstr($subject,"{Spam?}")){
            if(
$mode == "A")
            
imap_delete($mbox$i);
            echo 
"Delete spam: $i<br>";
        }

        
//if clear mode, delete all mail
        
if($mode == "C")
           
imap_delete($mbox$i);

    }

    
//except in test mode, expunge the delete files.


    
if($mode != "T")
       
imap_expunge($mbox);

    
imap_close($mbox);
  } else {
  
   echo 
"IMAP Access denied<br>";
   
   }

}

//MODES:  T = Test mode, A = Run mode, C = Clear all messages in box.  Run mode delete messages, test mode lists messages.

imap_purge("211.211.211.211","glenn@buggycode.com","phenox","A");



?>
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Php 5 abstraktMedia Suggestions 14 12-22-2004 08:14 AM
PHP Sessions Randomly Lose Variables wisewolfe Pre-Sales Questions 1 08-21-2004 09:55 AM
[Closed] PHP Problem nate_s_ Shared Hosting Support 3 06-07-2004 03:48 PM
php modules experor Customer Reviews 0 05-14-2004 02:27 AM
Disabling PHP magic_quotes_gpc mmc Webhosting 1 04-14-2004 12:56 PM

All times are GMT -6. The time now is 09:32 PM.