Error when setting up custom SMTP

Hi Team,

I’m getting this error while trying to setup custom SMTP details

The email provider is Microsoft 365, I’ve gone through the steps of enabling SMTP Auth, etc. and have tested all the details are working fine via SMTP Test Tool but still get this error in Noloco for some reason.

Hey @EthosLuke - have you tried disabling ‘Use a secure connection’ or checking if the port you’re using is correct?

Hey @darragh, the port number (587) is definitely correct, 25 and 465 both time out which is expected. Unfortunately, Microsoft 365 requires a secure connection so won’t work with that unticked either.

@EthosLuke this Stack Overflow posts suggests you should have http URL for the host instead of https

The https:// is wrong, it should be http:// . The proxy itself should be accessed by HTTP and not HTTPS even though the target URL is HTTPS. The proxy will nevertheless properly handle HTTPS connection and keep the end-to-end encryption. See HTTP CONNECT method for details how this is done

You can/should probably only be putting in a domain such as mail.example.com instead of a URL such as https://mail.example.com

I’m not quite sure that post relates to the issue (at least it shouldn’t, as the connection should be made via SMTP not HTTP/HTTPS).

For clarity, these are the settings I’m using and I have tested them outside of Noloco and they work fine:

I’ve gone ahead and tested adding http & https to the hostname anyway and get this error for both which is expected:
image

Can you try with secure = false ?

I’m looking at our other customers using Office 365 and that’s how they have it working

Aha… Yep that has worked, when I originally tried with secure turned off I also changed the port to 25 which didn’t work. Port 587 with secure connection off works!

1 Like

Thanks @EthosLuke - we’ll update our guide to explicitly mention this for Office365

1 Like

@EthosLuke - just a note, I had to use HTTP as well for mine via Elasticemail SMTP and have had excellent delivery so far – not sure what SMTP you’re using but be sure you have your DMARC settings configured correctly on your domain/smtp: DMARC Policy & Setup Requirements for Google & Yahoo Email | Proofpoint US