PrestaShop Email Sending Fix: Resolving OVH SMTP Configuration Errors in Modern PS

PrestaShop Email Sending Fix: Resolving OVH SMTP Configuration Errors in Modern PS Versions

Email communication is the lifeblood of any e-commerce store, from order confirmations to customer support. When your PrestaShop store can't send emails, it brings operations to a halt. A common challenge arises when configuring SMTP settings, especially with specific hosting providers like OVH, and this issue has evolved with PrestaShop's core updates.

One PrestaShop user, stephane82, highlighted a persistent problem across different PrestaShop versions hosted on OVH: a failure to configure SMTP for email sending. Initially encountered on an older PrestaShop 1.6.1.4 store, the same issue reappeared on a fresh installation of PrestaShop 9.1.3 (a version number that likely refers to a modern 8.x or future release, but the underlying issue and solution remain pertinent to contemporary PrestaShop platforms).

The Problem: "Wrong Version Number" SSL Error

The user's configuration attempts involved standard settings for OVH:

  • Domain: mondomaine.fr
  • Email Address: mail@mondomaine.fr
  • SMTP Server: ssl0.ovh.net
  • Encryption: TLS
  • Port: 587

Despite these seemingly correct settings, the system returned a critical error message:

Connection could not be established with host "ssl://ssl0.ovh.net:587": stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:ssl3_get_record:wrong version number

The user also noted that in the PrestaShop back office, there wasn't an explicit option to choose "SSL" for encryption, only "TLS" or "None". This detail is crucial for understanding the root cause.

Why the Error? The Shift to Symfony Mailer

The insightful reply from Knowband Plugins pinpointed the problem: a mismatch between the encryption method and port, exacerbated by changes in modern PrestaShop versions. Specifically, PrestaShop 8.x and any subsequent versions (like the user's mentioned 9.1.3) have transitioned their email system to Symfony Mailer. This significant update led to the removal of the older, explicit "SSL" encryption option from the back office, streamlining the process but also introducing potential confusion for users accustomed to older configurations.

The "wrong version number" error typically indicates a protocol mismatch – the client (PrestaShop) is trying to negotiate a connection using an SSL/TLS version that the server doesn't support or expects differently for the given port.

The Solution: Correcting Encryption and Port Combinations

To resolve this, two primary configurations were suggested, leveraging the capabilities of Symfony Mailer and common OVH settings:

  1. Option 1: Port 465 with TLS Encryption

    • SMTP Server: ssl0.ovh.net
    • Port: 465
    • Encryption: TLS

    Port 465 is traditionally used for SMTPS (SMTP over implicit SSL/TLS), which often works well with explicit TLS settings in modern clients.

  2. Option 2: Port 587 with "None" Encryption (Leveraging STARTTLS)

    • SMTP Server: ssl0.ovh.net
    • Port: 587
    • Encryption: None

    This configuration might seem counter-intuitive, but it's effective. Port 587 is for SMTP submission, and with Symfony Mailer, choosing "None" for encryption allows the system to automatically negotiate the STARTTLS protocol if the server supports it. This means the connection can still be securely encrypted even if the PrestaShop back office shows "None" as the selected option.

Crucial Additional Tip: Always ensure that the SMTP username entered in PrestaShop's email configuration matches the full email address (e.g., mail@mondomaine.fr), not just the username part.

General Best Practices for PrestaShop Email Configuration

When troubleshooting email sending issues in PrestaShop, remember these points:

  • Consult Your Host: Always check your hosting provider's (e.g., OVH, SiteGround, Bluehost) official documentation for their recommended SMTP server, port, and encryption settings. These can sometimes change.
  • Test Combinations: Be prepared to test different combinations of ports (25, 465, 587) and encryption types (None, TLS, SSL if available) until you find one that works.
  • Verify Credentials: Double-check your email address and password. A simple typo can prevent successful authentication.
  • Check Server Logs: If possible, review your server's mail logs for more detailed error messages that might not be displayed in PrestaShop.
  • Consider Dedicated Modules: For complex setups or persistent issues, a dedicated PrestaShop email module might offer more robust configuration options and better compatibility.

By understanding the changes introduced with Symfony Mailer and applying the correct port and encryption settings, PrestaShop merchants can overcome common SMTP configuration hurdles and ensure their e-commerce store communicates effectively with its customers.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools