php - How to access all the incoming emails for all different accounts on a mail server?


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?

People are also looking for solutions to the problem: jquery - Getting HTML value in PHP using AJAX and POST method


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.