We have developed a piece of software that uses a client's mail server to send mails. The client inputs all the relevant data (such as SMTP-Host, Username, Password, authentication method, start tls autodetection...) in his user account and the software uses it to send emails to email addresses the client also has uploaded. Our experience is that all clients who use an SMTP server supplied by a company (Ionos or Google etc.) can use the feature and it works well. The clients who set up their own mailserver usually can't. In their case our software tries to communicate with the email server and it simply doesn't respond, resulting in a timeout exception. I conclude that an email server must be set up to permit communication with another app (surely for security reasons, it makes sense).
How can this be done?