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?


Hi Guido,

Should be possible:

'app.mail.accounts.default' => [
  'email' => ''',
  'imapHost' => '',
  'imapPort' => 993,
  'imapUser' => '',
  'imapSslMode' => 'ssl',
  'smtpHost' => '',
  'smtpPort' => 486,
  'smtpUser' => ''',
  'smtpSslMode' => 'none',


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?