Error sending welcome message (Swift_RfcComplianceException)

Hello all,

Using Nextcloud 20.0.3 on Debian 10 and PHP 7.3.19, I’ve set up my config.php as following for the mail part:

‘mail_domain’ => ‘’,
‘mail_from_address’ => ‘’,
‘mail_smtphost’ => ‘’,
‘mail_smtpport’ => 465,
‘mail_smtpsecure’ => ‘ssl’,
‘mail_smtpname’ => ‘my_mail_username’,
‘mail_smtppassword’ => ‘mypassword’,

Trying to send the welcome message I’m facing an error. Looking at the log I can see
“Exception”:“Swift_RfcComplianceException”,“Message”:“Address in mailbox given [] does not comply with RFC 2822, 3.6.2.”

Clearly, the issue is that somewhere a process appends ‘@localhost.localdomain’ but I couldn’t figure out how to sort this out.

An idea, anyone?

Best regards,