PHP IMAP Install IMAP extension


To use the IMAP functions in PHP you'll need to install the IMAP extension:

Debian/Ubuntu with PHP5

sudo apt-get install php5-imap
sudo php5enmod imap

Debian/Ubuntu with PHP7

sudo apt-get install php7.0-imap

YUM based distro

sudo yum install php-imap

Mac OS X with php5.6

brew reinstall php56 --with-imap