Configuring Oracle email develiery with Gitlab self hosted instance

I have self hosted Gitlab Enterprise Edition and configured a third party SMTP server for Gitlab emails. It is working fine. But I am now trying to migrate to Oracle Email Delivery service with the below email configuration:

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "{{ my smtp address }}"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "{{ my smtp username }}"
gitlab_rails['smtp_password'] = "{{ my smtp password }}"
gitlab_rails['smtp_domain'] = "{{ my domain DKIM verifified }}"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
# gitlab_rails['smtp_tls'] = true
# gitlab_rails['smtp_pool'] = false

The reconfiguration is successful, but my email aren’t being delivered. I sent a test email from Gitlab Rails Console and this is the error I received (I have replaced my working email address with a dummy one here).

irb(main):001:0> Notify.test_email('', 'Hello World', 'This is a test message').deliver_now
Delivered mail 6559bdf16c0d4_eecfd2d7897413@gitlab.mail (1172.8ms)
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/net-smtp-0.3.3/lib/net/smtp.rb:1094:in `check_auth_continue': 504 The requested authentication mechanism is not supported (Net::SMTPSyntaxError)

I tried disabling starttls and enabling smtp_tls.

# gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true

This is the error (replaced ip address with xxx).

Delivered mail 6559c8aff0e5e_efa0d2d78686d0@gitlab.mail (292.0ms)
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:46:in `connect_nonblock': SSL_connect returned=1 errno=0 state=error: wrong version number (OpenSSL::SSL::SSLError)

Changing the port number from 587 to 25 times out the connection (Oracle recommends 587).

Wondering if I can get any help from this community. Please note that the error has to be with the settings since other services that I have Oracle email delivery configured works fine.