How to Install PHP imap Extension in Ubuntu?

By Hardik Savani May 14, 2024 Category : Ubuntu

Hi Artisan,

In this example, you will learn how to install php imap extension in ubuntu. you can see ubuntu php install imap extension. This tutorial will give you a simple example of install php imap extension ubuntu 20.04. you can see install php imap extension ubuntu. Follow the below tutorial step of ubuntu install php imap extension.

We can install php imap extension using php-imap library. i will give you following list of commands to install php imap extension in ubuntu 22.10, ubuntu 22.04, ubuntu 21.10, ubuntu 21.04, ubuntu 20.04, ubuntu 18.04 and ubuntu 16.04 server.

Install php-imap Extension:

Solution:

You need to run both commands one by one:

sudo apt-get install php-imap

Solution for PHP 8.2

You need to run both command one by one:

sudo apt-get install php8.2-imap

Solution for PHP 8.1

You need to run both command one by one:

sudo apt-get install php8.1-imap

Solution for PHP 8.0

You need to run both command one by one:

sudo apt-get install php8.0-imap

Solution for PHP 7.4

You need to run both command one by one:

sudo apt-get install php7.4-imap

Solution for PHP 7.3

You need to run both command one by one:

sudo apt-get install php7.3-imap

Solution for PHP 7.2

You need to run both command one by one:

sudo apt-get install php7.2-imap

Restart Apache Server:

Now, restart apache2 server using following command:

sudo service apache2 restart

Check php-imap Extension Installed:

Here, we will run following command to check extension is installed or not:

php -m | grep -i imap

Output:

I hope it can help you...

Tags :
Shares