Settings mail app

On my Nextcloud I’ve added the mail app. All users use the same mailserver and have a username which is equal to his/her username of their Nextcloud.
I prefer to not login at the user accounts to manual set each mail account settings
Is there a way to set the right settings?

Regards,
Guido

Hi Guido,

Should be possible:

'app.mail.accounts.default' => [
  'email' => '%USERID%@yourdomain.at'',
  'imapHost' => 'imap.yourserver.com',
  'imapPort' => 993,
  'imapUser' => '%USERID%@yourdomain.at',
  'imapSslMode' => 'ssl',
  'smtpHost' => 'smtp.yourserver.com',
  'smtpPort' => 486,
  'smtpUser' => '%USERID%@yourdomain.at'',
  'smtpSslMode' => 'none',
],

Reference: https://github.com/nextcloud/mail/pull/28

Thanks, MariusBluem!

What do I have to set if my mail (at this moment) not is using port 993/465, but no port.
Do I have to add these code into config/config.php or in another file?

Regards,
Guido