Page 1 of 1
Popping Email using PHP
Posted: Wed Nov 22, 2006 4:07 pm
by oldtimer
besides imap_open does anyone know any functions for popping email. some servers wont allow the imap_open to go through with either pop or imap connection. Been searching and not having any luck.
Posted: Wed Nov 22, 2006 4:11 pm
by volka
oldtimer wrote:some servers wont allow the imap_open to go through with either pop or imap connection.
you mean the actual network connection is blocked?
Posted: Wed Nov 22, 2006 4:11 pm
by Burrito
Posted: Wed Nov 22, 2006 6:18 pm
by oldtimer
This is what I get
<b>Warning</b>: imap_open(): Couldn't open stream {mail.thedomain.com/pop3:110}INBOX in <b>/home/crontasks/bounce_check.php</b> on line <b>13</b><br />
Could not open Mailbox - try again later!
now the same routine for imap give same error but it works for lets say my personal server.
Posted: Wed Nov 22, 2006 6:28 pm
by Burrito
let's see some code...
you should have something like this:
Code: Select all
$mail = imap_open("{mail.thedomain.com:110/pop3}INBOX", "username", "password");
Posted: Wed Nov 22, 2006 6:33 pm
by Luke
when I looked at this thread's title I thought it said "pooping out email" and since I'm immature and dorky I cracked up laughing.

Posted: Wed Nov 22, 2006 6:38 pm
by Burrito
try telnetting too to see if you can get in that way:
Code: Select all
telnet mail.thedomain.com 110
USER username
PASS password
LIST
if that works, then you could do as first suggested and use
fsockopen() in conjunction with
fwrite()
Posted: Thu Nov 23, 2006 10:38 am
by oldtimer
It does let me login. I can use a perl module and it works. just not the imap open.
I will check out the fsockopen and see if i can get that to work. I dont write to files i put all data into a DB. Execpt with the imap open i do save the attachments to the server.
Posted: Thu Nov 23, 2006 5:30 pm
by Chris Corbyn
One things bugs me about the IMAP functions. You can't surpress those errors. No matter what yu try they'll always get printed to the bottom of the page. Not sure if this has been fixed now or not.
Have you looked at PEAR mail?
Posted: Fri Nov 24, 2006 9:07 am
by oldtimer
I have used pear mail for sending. I also learning class.phpmailer.php / class.smtp.php and these are great for sending. but did not know pear mail could be used to check email.
Posted: Fri Nov 24, 2006 10:18 am
by Chris Corbyn
oldtimer wrote:I have used pear mail for sending. I also learning class.phpmailer.php / class.smtp.php and these are great for sending. but did not know pear mail could be used to check email.
There's one. It might be called PEAR IMAP but there's definitely one cos I've had the dis-pleasure of using it
