So simple and yet so difficult. Everywhere I find the syntax and variations. None work form but I don't really know what I'm doing... My host uses web based email (Horde, Squirrel, etc.). After harassing them for two weeks to get imap support installed they finally did and I can't get the imap_open to work. No matter what I try I get 'failed opening stream'...
- Should userid contain the full email address?
if (!$mbox = imap_open ("{localhost:2095/notls/norsh}inbox", $user, $pass)) {
echo "Failed to open mailbox!";
}
How do you use imap to open PLAIN text mailboxes?
I saw a post in the php doc: IMAP, POP and NNTP are ok. But plaintext mailboxes are unmentioned here. You just forget the {part} and go for the file (tested on unix):
$mbox = imap_open ($a_mail_box_file_name_in_home_dir, "", "") || die("Snif...:
".imap_last_error());