If you need to update Magento 2 SMTP Extension by MagePal, please follow the steps below. Note that the update instructions depend on the method the SMTP extension was installed with.

Update using composer (Method 1)

If the SMTP module was installed via the composer (check if vendor/magepal/magento2-gmailsmtpapp folder exists), then you need to run these simple CLI commands in Magento 2 directory:

composer remove magepal/magento2-gmailsmtpapp
composer require magepal/magento2-gmailsmtpapp ^x.x.x
# replace x.x.x with the version you want to use
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

Update using FTP  (Method 2)

If the SMTP module was installed via FTP (check if app/code/MagePal/GmailSmtpApp folder exists), then follow these commands:

  1. Make the backup copy of the app/code/MagePal/GmailSmtpApp and app/code/MagePal/Core folders on your server and then remove them.
  2. Run update CLI commands in Magento 2 directory:
mkdir app/code
mkdir app/code/MagePal
cd app/code/MagePal
wget https://github.com/magepal/magento2-gmail-smtp-app/archive/refs/heads/master.zip
unzip master.zip
rm master.zip
mv magento2-gmail-smtp-app-master GmailSmtpApp
wget https://github.com/magepal/magento2-core/archive/refs/heads/master.zip
unzip master.zip
rm master.zip
mv magento2-core-master Core
cd ../../..
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy