PHP Fatal error: Call to undefined function imap_open()

I got the following error while running a script:

PHP Fatal error: Call to undefined function imap_open()

Solution:

apt-get install php5-imap

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.