prestashop-guides

Mastering PrestaShop Email: Solving OVH SMTP 'Wrong Version Number' Errors in PS 8.x & Beyond

PrestaShop 8+ Email Configuration settings in the back office, showing SMTP server, port, and encryption fields.
PrestaShop 8+ Email Configuration settings in the back office, showing SMTP server, port, and encryption fields.

The Critical Role of Email in Your PrestaShop Store

Email communication is the silent workhorse of any successful e-commerce operation. From immediate order confirmations and shipping updates to password resets and crucial customer service interactions, a reliable email system is non-negotiable. When your PrestaShop store can't send emails, it's not just an inconvenience; it's a direct hit to your customer experience, operational efficiency, and ultimately, your bottom line. At Migrate My Shop, we understand these challenges, especially when navigating the complexities of hosting providers and evolving PrestaShop versions.

A common and particularly frustrating challenge arises when configuring SMTP settings, especially with specific hosting providers like OVH, and this issue has become more prevalent with PrestaShop's core updates. A recent PrestaShop forum thread highlighted a persistent problem faced by user stephane82 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: The Dreaded "Wrong Version Number" SSL Error

stephane82's configuration attempts involved what seemed like standard and correct settings for OVH:

  • Domain: mondomaine.fr
  • Email Address: mail@mondomaine.fr (used as SMTP username)
  • SMTP Server: ssl0.ovh.net
  • Encryption: TLS
  • Port: 587

Despite these seemingly correct settings, the system returned a critical and cryptic 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 a crucial detail: in the PrestaShop back office, there wasn't an explicit option to choose "SSL" for encryption, only "TLS" or "None". This observation is key to understanding the root cause of the problem.

Deconstructing the Error: What "Wrong Version Number" Means

The error message error:1408F10B:SSL routines:ssl3_get_record:wrong version number indicates a fundamental mismatch in the SSL/TLS protocol versions being attempted by the client (your PrestaShop store) and what the server (OVH's SMTP server) expects or supports. Essentially, PrestaShop is trying to initiate a connection using a protocol version (or method) that the OVH server rejects, leading to a failed secure handshake.

Why the Error? The Shift to Symfony Mailer in Modern PrestaShop

The core reason for this specific issue in modern PrestaShop versions (8.x and 9.x) lies in a significant architectural change: the migration of PrestaShop's email system from the older Swift Mailer to the more modern and robust Symfony Mailer. This transition, while bringing improved performance and maintainability, also altered how email encryption options are handled in the back office.

In PrestaShop 8.x and 9.x, the explicit "SSL" encryption option, which often implied older, less secure SSLv3 or TLSv1.0 protocols, was removed. This change reflects a broader industry move towards more secure and modern TLS protocols. When you select "TLS" in the PrestaShop back office, it typically attempts to use STARTTLS on port 587, or a direct TLS connection on port 465. The problem arises when the combination of the chosen encryption method and port doesn't align perfectly with the server's expected behavior, especially when an explicit `ssl://` prefix is internally added by PrestaShop's older logic or misinterpreted by the new Symfony Mailer in certain configurations.

OVH Specifics: Navigating Their SMTP Configuration

OVH, a popular hosting provider, has specific configurations for its email services. While their documentation generally points to ssl0.ovh.net as the SMTP server, the exact port and encryption method are crucial. Many providers support both port 465 (for implicit SSL/TLS) and port 587 (for STARTTLS, which upgrades an unencrypted connection to an encrypted one). The key is to find the combination that PrestaShop's Symfony Mailer can successfully negotiate with OVH's servers.

The Solution: Correcting Your PrestaShop Email Settings

Based on expert advice, the error stems from an incompatible encryption/port combination. To resolve the "wrong version number" error in PrestaShop 8.x and 9.x with OVH, you should try one of the following configurations:

Option 1: Explicit TLS/SSL on Port 465

  • SMTP Server: ssl0.ovh.net
  • Encryption: TLS (or sometimes 'SSL' if available in older versions, but 'TLS' is preferred for modern PS)
  • Port: 465

Port 465 is traditionally used for implicit SSL/TLS, meaning the connection is encrypted from the very beginning. This is often a reliable choice when direct TLS is desired.

Option 2: STARTTLS Negotiation on Port 587 with "None" Encryption

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

This option might seem counter-intuitive, as you're selecting "None" for encryption. However, with port 587, Symfony Mailer (and modern email clients) can automatically negotiate the STARTTLS protocol if the server supports it. This means the connection can still be encrypted even if the PrestaShop Back Office option indicates "None". STARTTLS upgrades an initial unencrypted connection to a secure, encrypted one.

Crucial Detail: SMTP Username

Regardless of the option you choose, always ensure that your SMTP username is the full email address (e.g., mail@mondomaine.fr), not just the part before the '@' symbol. This is a common requirement for many hosting providers, including OVH.

Step-by-Step: Configuring Email in PrestaShop 8.x/9.x

Here's how to apply these settings in your PrestaShop back office:

  1. Log in to your PrestaShop admin panel.
  2. Navigate to Shop Parameters > Email.
  3. Scroll down to the "Send email" section.
  4. Select "Set my own SMTP parameters (for advanced users only)".
  5. Fill in the fields as follows, trying Option 1 first, then Option 2 if the first fails:
    • Mail domain name: Your domain (e.g., mondomaine.fr)
    • SMTP server: ssl0.ovh.net
    • SMTP user: Your full email address (e.g., mail@mondomaine.fr)
    • SMTP password: The password for your email account
    • Encryption: Choose TLS (for port 465) or None (for port 587)
    • Port: Enter 465 or 587 accordingly
  6. Click "Save".
  7. Test your configuration by sending a test email from the same page.

Additional Troubleshooting Tips

If the above solutions don't immediately resolve your issue, consider these additional steps:

  • Verify Credentials: Double-check your email address and password. A simple typo can cause hours of frustration.
  • Check OVH Documentation: OVH's official documentation for email configuration might have specific, up-to-date recommendations for your particular hosting plan.
  • Server Firewall: Ensure that your hosting environment's firewall isn't blocking outgoing connections on ports 465 or 587. This is less common for shared hosting but can occur on VPS or dedicated servers.
  • PHP Mail Function: As a temporary fallback or diagnostic tool, you can try sending emails using the PHP mail() function (if enabled on your server). While less reliable for high-volume e-commerce, it can help determine if the issue is specific to SMTP or a broader server-side problem.
  • Contact OVH Support: If all else fails, provide OVH support with the exact error message and your attempted configurations. They can check server-side logs and confirm the correct settings for your specific email service.

Why Expert Migration Matters

This scenario perfectly illustrates why expert PrestaShop migration services are invaluable. When upgrading from older PrestaShop versions (like 1.6) to modern platforms (8.x or 9.x), underlying system changes – such as the shift to Symfony Mailer – can introduce unexpected compatibility issues. A professional migration ensures that all critical functionalities, including email sending, are thoroughly tested and correctly configured in the new environment, preventing downtime and lost sales.

Conclusion

Reliable email communication is the backbone of your PrestaShop store. While the "wrong version number" SSL error can be daunting, understanding the shift to Symfony Mailer in modern PrestaShop versions and knowing the correct OVH SMTP configurations for ports 465 and 587 are key to resolving it. By carefully applying these settings and following our troubleshooting advice, you can restore your store's vital email functionality and keep your customers informed and engaged. If you're planning a PrestaShop upgrade or facing complex configuration challenges, remember that Migrate My Shop is here to ensure a smooth transition and optimal performance for your e-commerce business.

Share:

Start with the tools

Explore migration tools

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

Explore migration tools