Cant get smtp to work on one-click digital ocean install

After deploying a one-click RC on digital ocean everything worked like a charm except when trying to set up smtp. My dedicated email uses port: 587 and STARTTLS. I tried all the possibilities in the configuration page on RC and dedicated hours trying to find help online to no avail.

I also, opened the port 587 as I use ufw but I keep receiving the following log. Anyone that could help?

Exception in defer callback: { Error: Connection timeout at SMTPConnection._formatError (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/email/node_modules/node4mailer/lib/smtp-connection/index.js:558:19) at SMTPConnection._onError (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/email/node_modules/node4mailer/lib/smtp-connection/index.js:531:20) at Timeout._connectionTimeout.setTimeout (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/email/node_modules/node4mailer/lib/smtp-connection/index.js:249:18) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) code: ‘ETIMEDOUT’, command: ‘CONN’ }

Server Setup Information

  • Version of Rocket.Chat Server: 2.40
  • Operating System: Ubuntu 18.04
  • Deployment Method: Digital Ocean once-click
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version: v8.15.1
  • MongoDB Version: 4.0.3