Email configuration not working

I am facing error when configuring my email in metabase.

When i select SMTP secutiry none, i get the below error.
Sorry, something went wrong. Please try again. Error: 451 5.7.3 STARTTLS is required to send mail [BL1PR13CA0308.namprd13.prod.outlook.com 2023-01-27T10:19:14.158Z 08DB0032E8CD72C4]

When i select STARTTLS, I'm getting the below error.
Sorry, something went wrong. Please try again. Error: : Exception reading response: Read timed out

Diagnostic info:
{
"browser-info": {
"language": "en-GB",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.14.1+1",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.14.1",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.14.1+1",
"os.name": "Linux",
"os.version": "5.4.202+",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"postgres",
"bigquery",
"h2"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "11.16"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.23"
}
},
"run-mode": "prod",
"version": {
"date": "2022-03-23",
"tag": "v0.42.3",
"branch": "release-x.42.x",
"hash": "33fb268"
},
"settings": {
"report-timezone": null
}
}
}

@flamber can you please help me here?

You're using an old version of Metabase. That bug was fixed in recent versions of the product office365.com and "Sorry, something went wrong. Please try again. Error: : Exception reading response: Read timed out" · Issue #19662 · metabase/metabase · GitHub

Thanks for the reply...

Upgraded to the latest version - 0.45.2.1, now getting wrong username or password error. However the credentials used are the right ones.

[f78046f9-b32e-46a5-a53b-c8fe49deefe1] 2023-02-01T10:40:17+05:30 DEBUG metabase.server.middleware.log PUT /api/email 400 8.7 s (0 DB calls)
{:errors {:email-smtp-username "Wrong username or password", :email-smtp-password "Wrong username or password"}}

Can you please help here?

Can you provide information about the configuration of that SMTP? is it authenticated via active directory?

Host: smtp.office365.com
Port: 587

yes it is authenticated via AD

Metabase won't support AD authentication, we only support user/pass authentication to SMTP servers