I\'m trying to add incoming email to my web application. It\'s built on CodeIgniter and PHP, and as far as I can tell I haven\'t found any CI libraries to do this.
What
For a more independent approach you could build a Third party plugin with Zend framework (https://docs.zendframework.com/zend-mail/read/). I have used their ACL modules within Codeigniter and is a good way of getting the best of both frameworks.
This also allows you to parse the emails and extract attachments etc.
http://ca.php.net/imap
$mb = imap_open("{host:port/imap}","username", "password" );
$messageCount = imap_num_msg($mb);
for( $MID = 1; $MID <= $messageCount; $MID++ )
{
$EmailHeaders = imap_headerinfo( $mb, $MID );
$Body = imap_fetchbody( $mb, $MID, 1 );
doSomething( $EmailHeaders, $Body );
}