SMTP unrecognized authentication type with Office 365

FWIW, here is what I have found. I went into the docker image and started monkeying around with the lib/tasks/emails.rake script and the config/discourse.conf file. Several hours later, after trying every possible combination of smtp.office365.com and .mail.protection.outlook.com AUTH login and AUTH plain I uncommented the block above the STMP start.

# We would like to do this, but Net::SMTP errors out using starttls
#Net::SMTP.start(smtp[:address], smtp[:port]) do |s|
#  s.starttls if !!smtp[:enable_starttls_auto] && s.capable_starttls?
#  s.auth_login(smtp[:user_name], smtp[:password])
#end

Running that as-is resulted in a read timeout.
Modifying it like this - calling new rather than start resulted in a successful send.

Net::STMP.new(smtp[:address], smtp[:port]) do |s|
    s.enable_starttls
    s.auth_login(smtp[:user_name], smtp[:password])
end

This is my first exposure to Ruby, rake and friends. I can’t explain why it works or if is a ‘good thing’ for general cases.
J.