I am doing a small project for my college, in which I have to scan incoming emails for certain keywords. If they are clear, then only allow them to be read by user from inbox.
I am developing this in PHP using CodeIgnitor, and I am using hmailserver for mail server.
I was going to use this PHP code to access the mailbox, and fetch the mails:
$mb = imap_open("{host:port/imap}","username", "password" );
Also, something like in this article.
The issue is, there will be multiple user accounts on mail server. I cannot provide username and password for every account in PHP code. How can I check the incoming email content, before the user receives it, without giving usernames and passwords of each and every account on mail server?