If you see the error "IMAP configuration is not correct" in PrestaShop, it means your email settings are incorrect, preventing the system from connecting to the mail server. Below is a step-by-step guide to fix this issue.

Common Causes of IMAP Configuration Errors

  • Incorrect IMAP Host or Port
    • The mail server details are incorrect or unreachable.
  • Wrong Username or Password
    • Authentication fails due to incorrect credentials.
  • IMAP Not Enabled on the Mail Server
    • The email provider may have IMAP disabled by default.
  • SSL/TLS Mismatch
    • Incorrect security settings can block the connection.
  • Firewall or Hosting Restrictions
    • Some hosts block IMAP connections by default.

Correct IMAP Configuration for PrestaShop

Go to PrestaShop Back Office and navigate to:

> Advanced Parameters > Email > IMAP Configuration

Recommended IMAP Settings

Use the correct IMAP settings based on your email provider:

1. Gmail IMAP Settings

Parameter Value
IMAP Host imap.gmail.com
IMAP Port 993
Encryption SSL
IMAP Username Your full email (e.g., yourname@gmail.com)
IMAP Password Your email password or App Password (if 2FA is enabled)

2. Outlook/Office 365 IMAP Settings

Parameter Value
IMAP Host outlook.office365.com
IMAP Port 993
Encryption SSL
IMAP Username Your full email (e.g., yourname@outlook.com)
IMAP Password Your email password or App Password

3. cPanel/Custom Mail Server

Parameter Value
IMAP Host mail.yourdomain.com
IMAP Port 993 (SSL) or 143 (Non-SSL)
Encryption SSL or TLS
IMAP Username Your full email (e.g., yourname@yourdomain.com)
IMAP Password Your email password

Fixing Common IMAP Errors

  • Verify IMAP Server Connection
    Test if IMAP is accessible from your hosting server by running this command in SSH: telnet imap.yourmailserver.com 993
    • If it connects, IMAP is working.
    • If it fails, check firewall rules or contact the mail provider.
  • Enable IMAP in Your Email Account
    For Gmail:
    1. Go to Gmail Settings > Forwarding and POP/IMAP.
    2. Enable IMAP access.
    For Outlook:
    1. Go to Outlook Web Settings > Sync Email.
    2. Enable IMAP.
  • Check Firewall and Hosting Restrictions
    • Ensure that your hosting provider allows outbound IMAP connections.
    • Open required IMAP ports (993 for SSL or 143 for non-SSL) in the firewall:
    sudo ufw allow 993/tcp sudo ufw allow 143/tcp
  • Enable Less Secure Apps (If Needed)
    For Gmail and Outlook, you may need to allow PrestaShop to access IMAP:
  • Use an App Password (If 2FA is Enabled)
    For added security, generate an App Password instead of using your regular email password.

Testing Your Configuration

After applying the correct settings:

  1. Save your IMAP settings in PrestaShop.
  2. Send a test email from PrestaShop.
  3. Check for errors in logs:
    Navigate to Advanced Parameters > Logs.

Conclusion

The "IMAP configuration is not correct" error in PrestaShop is usually caused by incorrect settings, disabled IMAP, or connection issues. Follow the steps above to troubleshoot and resolve the issue.