Gitea

sudo vim /etc/gitea/app.ini
[mailer]
ENABLED = true
HOST    = smtp.office365.com:587
SMTP_PORT = 587
SMTP_ADDR = smtp.office365.com
MAILER_TYPE = smtp
FROM    = service@aiursoft.com
USER    = service@aiursoft.com
PASSWD  = `Password@1234`
IS_TLS_ENABLED = true # Try false if failed.

GitLab

 gitlab_rails['smtp_enable'] = true
 gitlab_rails['smtp_address'] = "smtp.office365.com"
 gitlab_rails['smtp_port'] = 587
 gitlab_rails['smtp_user_name'] = "service@aiursoft.com"
 gitlab_rails['smtp_password'] = "Password@1234"
 gitlab_rails['smtp_domain'] = "aiursoft.com"
 gitlab_rails['smtp_authentication'] = "login"
 gitlab_rails['smtp_enable_starttls_auto'] = true
 gitlab_rails['smtp_tls'] = true # Try false if failed.
 gitlab_rails['smtp_pool'] = true
 
 gitlab_rails['smtp_openssl_verify_mode'] = 'peer'
 gitlab_rails['gitlab_email_enabled'] = true
 gitlab_rails['gitlab_email_from'] = 'service@aiursoft.com'
 
 gitlab_rails['gitlab_email_display_name'] = 'Aiursoft GitLab Service'
 gitlab_rails['gitlab_email_reply_to'] = 'service@aiursoft.com'

Mastodon

sudo vim /home/mastodon/live/.env.production
SMTP_SERVER=smtp.office365.com
SMTP_PORT=587
SMTP_LOGIN=service@aiursoft.com
SMTP_PASSWORD='Password@1234'
SMTP_AUTH_METHOD=login
SMTP_OPENSSL_VERIFY_MODE=peer
SMTP_ENABLE_STARTTLS=auto
SMTP_FROM_ADDRESS=service@aiursoft.com

Nextcloud

First open the admin settings at: https://yourinstance/index.php/settings/admin

file

You can try to disable TLS if it keeps failing.

Azure DevOps

file