Fail to configure SMTP on brand new hosting, first launch

Nextcloud version: 14.0.3
Operating system and version (eg, Ubuntu 17.04): Shared hosting (not sure about version)
Apache version: 2.4
PHP version: 7.0.32

The issue you are facing:
Trying to configure SMTP server, that is the same of my hosting.Getting error( on debug mode):
A problem occurred while sending the email. Please revise your settings. (Error: Connection could not be established with host smtp.domain.com [ #0] Log data: ++ Starting Swift_SmtpTransport !! Connection could not be established with host smtp.domain.com [ #0] (code: 0))

Is this the first time you’ve seen this error? (Y/N):
Yes, and first time to configure

Steps to replicate it:

  1. Upload Nextcloud to my shared hosting
  2. Try to configure, Fail
  3. Move Domain NameServer to CloudFlare getting Https, and try again.
  4. getting the error
  5. change email Password to simple one 123 and same.

The output of your Nextcloud log in Admin > Logging:
Nothing relevant to this topic…

max_user_connections 

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

In the shared host i can’t get this path’s

I also try to test the smtp with external service, and found it working well.
I can’t reach to the problem…

Just try to use other SMTP that work in other nextcloud on another server. it’s not work. the problem isn’t in the SMTP, its in the specific system. I think the last version have problem.