I'm setting up an email 'proxy-like' where notification emails are sent to the user that he has subscribed to, but he can reply to the email notification@site.com
which should contain his reply. On the server-side I want to be able to read his email and add his reply to the database - the email is stored in the notification
user inbox which is great, now to be able to read it with PHP.
So, I've been looking around for solutions for this, many solutions were IMAP so I thought I'd give a try but I cannot seem to figure my connection my server to open the inbox. I've adjusted to different ports, but none of them are able to connect.
imap_open("{localhost/imap:143}", "notification", "password");
I get errors like this:
Warning: imap_open(): Couldn't open stream {localhost/imap:143} in /var/www/site.com/www/mail.php on line 8
bool(false)
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=1) in Unknown on line 0
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=1) in Unknown on line 0
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=1) in Unknown on line 0
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=2) in Unknown on line 0
I don't understand, obviously this is my first time trying this but what is it that I'm clearly doing wrong with the connection?
EDIT: I started courier-imap
now I get this:
Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=1) in Unknown on line 0
Notice: Unknown: [ALERT] Fatal error: No such file or directory: No such file or directory in Unknown on line 0