SMTP setup with exchange server

Hello I am new to this forum and I have learned a lot from the tutorials, so thumbs up for you craig!

The problem I am running into is a setup issue for the mail server.
From what I understand it is better to have a seperate mail server then running it on the server which is running magento.

We can use a dedicated mailserver (exchange) and it should be possible to send out mail using that server via SMTP.

I tried the extention of mageplaza and I had it working with gmail but when I am trying to connect it via the exchange server it does not work.

Do you or anybody has experience with setting up mageplaza SMTP for an exchange server? What am I overseeing?

magento 2.3.4 installed via composer / running on digitalocean cloud / Ubuntu 16.04

The setup i tried is the following

Hi @kees and welcome,

I admit, I’ve never had the need to setup a mailserver as I’ve always used a 3rd party service.

If I recall correctly, I’ve seen a mixed bag of experiences with the Mageplaza SMTP Module. You’ll often find that their free modules can be found on github, which is usually good because you can see issues people have bothered to report that might relate to your own problem. Here you can find their Github Repository.

You mention that the module works fine with Gmail, but not with your own exchange. Out of curiosity, what solution are you using for your own email exchange?

As I mentioned, I don’t have any experience running a dedicated exchange server… However, that message would make me want to check that openssl and curl is up-to-date on both my Magento Server and Exchange Server. Hopefully, it’s a simple as getting the latest version. Or perhaps SSL is mis-configured on the mailserver? I think this should update both applications:

sudo apt-get update
sudo apt-get install curl openssl

Finally, I did a Google Search for “SSL3_GET_RECORD:wrong version number error”, and there are a load of results… But they mostly go over my head. Plus, this error may simply be a side-affect of something else. Sorry, I couldn’t give a more definitive answer.

Hello @digitalstartup,

Thanks that you found the time to answer.
In the meanwhile I found the solution on github.


The mageplaza module had an error in it and a modification was suggested but was not followed up. Mageplaza promised to change it in the next version.

The mailserver which is used is a microsoft exchange server with a own domain and the ip adres is set up in the relay connector, so email coming from the right IP adres will be processed.

The result will probably be hopefully not to end in the spam box.

Mailchimp is used for the marketing maling.

To be honest I am not sure wich is better, use a private business exchange server or a third party server.

thumbs up for your tutorials again craig!

1 Like