Forum Moderators: coopster
I Am having trouble with imap_open() on my local (test) server.
I Can't seem to open the file, while this does work on the live server.
I keep getting the error: "Couldn't open stream /path/to/mail.eml: no such mailbox".
The file is accessable since i can open it with file_get_contents() and fopen() etc..
Does someone have an idea how i can fix this?
In the older versions they allowed a full-path to the file.
In the newer versions they droped that because of security.
To fix this is relativly simple.
The imap_open() starts from the $HOME path.
What i do is, i set the $HOME path with putenv() to the location where the mail is located.
After that i can just give the filename to imap_open() and it will read the file.
Hope this can help some other ppl.