Brevo SMTP "wrong version number" on smtp-relay.brevo.com:587
Port 587 on smtp-relay.brevo.com uses STARTTLS, so connecting with implicit SSL (an ssl:// prefix or an SSL checkbox) fails with "wrong version number". Switch the encryption setting to TLS or STARTTLS and use the smtp-relay.brevo.com host. If "certificate verify failed" follows, update your server's CA bundle.
Sohail Hussain8 min readShort answer
- Port 587 uses STARTTLS, so your app must connect in plain text first and upgrade. The ssl:// prefix (the SSL checkbox) forces an immediate TLS handshake, which is what produces "wrong version number".
- Switch the encryption setting to TLS or STARTTLS, or to none (Brevo says to leave encryption empty on 587), keep the host smtp-relay.brevo.com and port 587, and retry.
- If the error then becomes "certificate verify failed", update the CA bundle and check the server clock.
You set up Brevo SMTP in your forum, CMS or app, and mail stopped with this:
Connection could not be established with host "ssl://smtp-relay.brevo.com:587": stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:0A00010B:SSL routines::wrong version number
People on the XenForo community forum reported this on XenForo 2.3.4. With SSL checked they got the error above; with it unchecked, the STARTTLS upgrade failed with "certificate verify failed". Both are fixable, and they are two different problems.
Why Brevo SMTP returns "wrong version number"
The ssl:// prefix means your app opened the socket and started a TLS handshake straight away. That is correct for implicit TLS on port 465. On port 587 the server first sends a plain-text 220 greeting and waits for EHLO and then STARTTLS.
OpenSSL gets readable text where it expected a TLS record, cannot parse it, and reports wrong version number. The code 0A00010B is how OpenSSL 3.x prints it. Your credentials, Brevo's server and its certificate are not at fault; the two sides disagree about how the connection starts.
Brevo's own help page matches this: use port 587 for TLS encryption and port 465 for SSL encryption.
| Port | How the connection starts | App setting to pick |
|---|---|---|
| 587 | Plain connect, then STARTTLS upgrade | TLS or STARTTLS (or none, per Brevo) |
| 465 | TLS from the first byte | SSL |
| 2525 | Alternative submission port | Same as 587 |
Fix 1: switch the encryption setting
- Open your application's SMTP or mail settings (in XenForo, the email options in the admin control panel).
- Set the host to
smtp-relay.brevo.comand the port to587. - Change encryption from SSL to TLS or STARTTLS. If your app has no such choice and only offers SSL on or off, turn SSL off.
- Enter your SMTP login and an SMTP key as the password, not your Brevo account password.
- Send a test message.
Brevo's setup page says to leave the encryption field empty unless you're using port 465, where you select SSL or TLS. Apps that upgrade automatically will still negotiate STARTTLS on 587, so leaving it empty is a valid choice there.
If your app uses a DSN instead of a dropdown, check the scheme. In Symfony Mailer, smtp:// negotiates STARTTLS on 587, while smtps:// forces implicit TLS. In raw PHP, ssl:// is the wrong prefix for 587; let your mail library handle STARTTLS.
Port and mode go together
Change them as a pair. 587 with STARTTLS, or 465 with SSL. Changing only one is the usual way this error appears.
If your app only supports SSL
Use port 465 with encryption set to SSL. Brevo lists 465 as supported, along with 587 and 2525, per its troubleshooting page. See Brevo's article, Which SMTP port should I use?, for the full comparison.
Fix 2: "certificate verify failed" after turning SSL off
Once the mode is right, the handshake really happens, and your server must validate Brevo's certificate chain. If it cannot, you get certificate verify failed. Causes, most common first:
| Cause | Symptom | Fix |
|---|---|---|
| Outdated CA bundle | Fails on older servers or minimal containers | Update ca-certificates, restart PHP |
| PHP has no CA file | Empty openssl.cafile and curl.cainfo | Point them at a current bundle |
| Wrong system clock | Valid certs look expired | Fix time, enable NTP |
| TLS-inspecting proxy | Certificate issuer is not Brevo | Add proxy CA or exempt the host |
| Old or wrong host | Config still names a legacy host | Use smtp-relay.brevo.com |
Steps for the usual case:
- Confirm the host is exactly
smtp-relay.brevo.com. Brevo says to enter smtp-relay.brevo.com as the SMTP server. - On Debian or Ubuntu, run
sudo apt update && sudo apt install --reinstall ca-certificates, thensudo update-ca-certificates. - Restart PHP-FPM or Apache so the new bundle is read.
- Check
dateagainst real UTC time and enable NTP if it is off. - Check
openssl.cafileinphp.ini. If it is empty, PHP uses the system default, which may be stale.
Do not disable verification
Turning off peer verification hides the error, but it also lets anyone intercepting the connection read your SMTP credentials. Fix the trust store instead.
Test from the command line
Testing outside your app separates a configuration problem from a network one:
openssl s_client -starttls smtp -connect smtp-relay.brevo.com:587 -crlf
You should see a certificate chain and a verify result of Verify return code: 0 (ok). If this works but your app fails, the app's settings are the problem. If it reports a verify error, the server's trust store is the problem and Fix 2 applies.
To reproduce the original error on purpose, run the same command without -starttls smtp. It fails with wrong version number, which confirms the diagnosis.
Other errors that look similar
| Symptom | Likely cause |
|---|---|
| Timeout or connection refused | Host blocks outbound 587; try 2525 or 465 |
535 authentication failed | Wrong login, key with stray spaces, or host used as login |
| Auth fails despite correct key | Encryption type does not match the port |
| Mail accepted but not delivered | Sender or domain not authenticated |
For 535, Brevo's troubleshooting page says to find your SMTP login under Settings > SMTP & API, in the Login field. It also warns that smtp-relay.brevo.com is the relay host, not a login. Paste the key into a plain-text editor first, because even a single extra character causes a 535 error. More detail is in Brevo's troubleshooting page for SMTP.
If mail is accepted but lands in spam, that is authentication, not connection. See how to set up SPF, DKIM and DMARC, and use the email header analyzer on a delivered test message. For background, read the SMTP glossary entry and our explainer on SSL/TLS for email.
Checklist before you try again
- Host is
smtp-relay.brevo.com, with nossl://prefix. - Port 587 with TLS/STARTTLS (or empty encryption), or port 465 with SSL.
- Username is the SMTP login from Settings > SMTP & API, not the host name.
- Password is an SMTP key with no leading or trailing spaces.
- Server clock is correct and CA certificates are current.
openssl s_client -starttls smtpsucceeds from the same server.
If nothing works
If openssl s_client succeeds from the same server and your app still fails, the problem is in the app or its library; ask the app's vendor. If the command also fails from several networks, or the certificate chain looks wrong, contact Brevo support. Include the exact error text, host and port, a UTC timestamp of a failed attempt, your server's outbound IP and the openssl output.
Subject: SMTP TLS failure on smtp-relay.brevo.com:587
Hello,
My server cannot send through Brevo SMTP.
Host/port: smtp-relay.brevo.com:587 (STARTTLS)
Error: certificate verify failed (or paste the exact error)
Time of failed attempt (UTC): {timestamp}
Server outbound IP: {ip}
Already tried: encryption set to TLS/STARTTLS, updated CA bundle, checked clock.
Output of openssl s_client -starttls smtp -connect smtp-relay.brevo.com:587 is attached.
Please advise.
Common questions
Should I use 587 or 465 with Brevo?
Brevo recommends starting with 587 as the default. Use 465 only if your app can do nothing but implicit SSL, and 2525 if your host blocks 587.
Is "wrong version number" a problem on Brevo's side?
No. It means your app began a TLS handshake where the server expected plain SMTP first. Correcting the encryption setting resolves it.
Why did it work before and stop after an upgrade?
An upgrade can change a default encryption mode or ship a newer OpenSSL that reports the mismatch differently. Recheck the port and encryption pair, then run the openssl s_client test.
Can I just skip certificate verification?
Do not. It removes the protection TLS gives your credentials. Update the CA bundle and fix the clock instead.
Explore: Email Deliverability
Related Articles
Brevo form reCAPTCHA "invalid domain": add sibforms.com
A Brevo form that shows "reCaptcha invalid domain" usually means your reCAPTCHA key doesn't list sibforms.com, the domain Brevo serves its forms from. Open the key in the Google reCAPTCHA console, add sibforms.com under domains, save, and reload the form. A new key fails the same way until the domain is added.
Brevo "High probability of spam" on transactional emails: fix
"High probability of spam" on Brevo transactional emails is the receiving server's spam verdict, not an authentication failure. New accounts send from shared IPs, and new domains have no history. Fix the content and links first, then send small, steady, real volume so reputation builds.
Yahoo 554 5.7.9 soft bounce spike: causes and fixes
A sudden soft bounce spike on Yahoo addresses with 554 5.7.9 is usually a policy block on your message or sending reputation, not dead mailboxes. Read the SMTP reason text instead of your ESP's bucket, reset soft bounce counters on successful delivery, and fix the trigger before suppressing anyone.
0x800ccc0e: Outlook Unable to Connect to SMTP Server, Fixed
Outlook error 0x800ccc0e means the app could not open a connection to your outgoing (SMTP) server. Usually the port, encryption setting or password is wrong, or antivirus, a firewall or your ISP is blocking it. Set port 587 with STARTTLS, turn on SMTP authentication, and test again.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free