Hi ntozier,Thanks for the pointer. You were right! Running php -m showed that imap was not installed for the CLI version of PHP, while phpinfo() showed that it was installed for the Apache version.For anyone finding this thread in the future, in my case (Ubuntu 14.04.1), the file I had to edit was /etc/php5/cli/php.ini. I just addedextension=imap.so to the end of it, and all is working now.Thanks for you help, it is appreciated!