Basic Setup: Email Server: Swift_TransportException

Nextcloud version (eg, 12.0.2): 17.0.1
Operating system and version : Ubuntu 18.04.3
Apache or nginx version: Apache/2.4.29 (Ubuntu)
PHP version : 7.2.24

The issue I am facing:
I can’t get the Email Server to work in Basic Settings. I just installed Nextcloud. I’m using this Virtual Machine:
https://shop.hanssonit.se/product/nextcloud-vm-500gb/
When I try to send Test Email, I receive error message about swiftmailer.

Is this the first time you’ve seen this error? (Y/N):
I tried lots of different entries in Basic Settings: Email Server, and continue to get same error message. I have never run Nextcloud before. Newbie!
I created an email account at posteo.de. I entered the username and address into Settings: Personal Info.
I entered same info into Email Server: From address, Credentials, and password for the posteo.de account in SMTP Password

The output of your Nextcloud log in Admin > Logging:

Swift_TransportException: Failed to authenticate on SMTP server with username "*deleted for privacy*" using 1 possible authenticators. Authenticator LOGIN returned Swift_TransportException: Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " in /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:457 Stack trace: #0 /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(341): Swift_Transport_AbstractSmtpTransport->assertResponseCode('535 5.7.8 Error...', Array) #1 /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(305): Swift_Transport_AbstractSmtpTransport->executeCommand('RTZwSktrVUxYTjc...', Array, Array, false, NULL) #2 /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php(36): Swift_Transport_EsmtpTransport->executeCommand('RTZwSktrVUxYTjc...', Array) #3 /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php(177): Swift_Transport_Esmtp_Auth_LoginAuthenticator->authenticate(Object(Swift_SmtpTransport), 'gingersnap', 'E6pJKkULXN7#(jp...') #4 /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(371): Swift_Transport_Esmtp_AuthHandler->afterEhlo(Object(Swift_SmtpTransport)) #5 /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(148): Swift_Transport_EsmtpTransport->doHeloCommand() #6 /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(65): Swift_Transport_AbstractSmtpTransport->start() #7 /var/www/nextcloud/lib/private/Mail/Mailer.php(180): Swift_Mailer->send(Object(Swift_Message), Array) #8 /var/www/nextcloud/settings/Hooks.php(217): OC\Mail\Mailer->send(Object(OC\Mail\Message)) #9 /var/www/nextcloud/settings/Application.php(209): OC\Settings\Hooks->onChangeEmail(Object(OC\User\User), 'gingersnap@post...') #10 /var/www/nextcloud/lib/private/legacy/hook.php(106): OC\Settings\Application->onChangeInfo(Array) #11 /var/www/nextcloud/lib/private/Server.php(432): OC_Hook::emit('OC_User', 'changeUser', Array) #12 [internal function]: OC\Server->OC\{closure}(Object(OC\User\User), 'eMailAddress', 'gingersnap@post...', 'gingersnap@post...') #13 /var/www/nextcloud/lib/private/Hooks/EmitterTrait.php(99): call_user_func_array(Object(Closure), Array) #14 /var/www/nextcloud/lib/private/Hooks/PublicEmitter.php(36): OC\Hooks\BasicEmitter->emit('\\OC\\User', 'changeUser', Array) #15 /var/www/nextcloud/lib/private/User/User.php(473): OC\Hooks\PublicEmitter->emit('\\OC\\User', 'changeUser', Array) #16 /var/www/nextcloud/lib/private/User/User.php(168): OC\User\User->triggerChange('eMailAddress', 'gingersnap@post...', 'gingersnap@post...') #17 /var/www/nextcloud/settings/Controller/UsersController.php(416): OC\User\User->setEMailAddress('gingersnap@post...') #18 /var/www/nextcloud/settings/Controller/UsersController.php(357): OC\Settings\Controller\UsersController->saveUserSettings(Object(OC\User\User), Array) #19 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(170): OC\Settings\Controller\UsersController->setUserSettings('contacts', 'dragonfly', 'contacts', '', 'private', 'gingersnap@post...', 'contacts', '', 'private', '', 'private', '', 'private') #20 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(99): OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Settings\Controller\UsersController), 'setUserSettings') #21 /var/www/nextcloud/lib/private/AppFramework/App.php(126): OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Settings\Controller\UsersController), 'setUserSettings') #22 /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\AppFramework\App::main('OC\\Settings\\Con...', 'setUserSettings', Object(OC\AppFramework\DependencyInjection\DIContainer), Array) #23 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array) #24 /var/www/nextcloud/lib/private/Route/Router.php(297): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array) #25 /var/www/nextcloud/lib/base.php(1000): OC\Route\Router->match('/settings/users...') #26 /var/www/nextcloud/index.php(42): OC::handleRequest() #27 {main}.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => '*deleted for privacy*t',
  'secret' => '*deleted for privacy*',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '192.168.1.206',
    2 => 'cloud.gingersnap.io',
    3 => 'cloud.gingersnap.io',
  ),
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '17.0.1.1',
  'overwrite.cli.url' => 'https://cloud.gingersnap.io/',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '*deleted for privacy*',
  'dbpassword' => '*deleted for privacy*',
  'installed' => true,
  'instanceid' => '*deleted for privacy*',
   'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => '2',
  'mail_smtpmode' => 'smtp',
  'remember_login_cookie_lifetime' => '1800',
  'log_rotate_size' => '10485760',
  'trashbin_retention_obligation' => 'auto, 180',
  'versions_retention_obligation' => 'auto, 365',
  'simpleSignUpLink.shown' => 'false',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.5,
    'dbindex' => 0,
    'password' => '*deleted for privacy*',
  ),
  'logtimezone' => 'US/Pacific',
  'htaccess.RewriteBase' => '/',
   'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.5,
    'dbindex' => 0,
    'password' => '*deleted for privacy*',
  ),
  'logtimezone' => 'US/Pacific',
  'htaccess.RewriteBase' => '/',
  'maintenance' => false,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '*deleted for privacy*',
  'mail_domain' => 'posteo.net',
  'mail_smtpsecure' => 'tls',
  'mail_smtphost' => 'posteo.de',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '*deleted for privacy*',
  'mail_smtppassword' => '*deleted for privacy*',
  );
(END)

The output of your Apache/nginx/system log in /var/log/____:
``[Thu Dec 05 06:25:07.040362 2019] [mpm_event:notice] [pid 8414:tid 140249450556352] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 configured – resuming normal operations
[Thu Dec 05 06:25:07.040382 2019] [core:notice] [pid 8414:tid 140249450556352] AH00094: Command line: ‘/usr/sbin/apache2’
[Thu Dec 05 14:40:22.198801 2019] [mpm_event:notice] [pid 8414:tid 140249450556352] AH00491: caught SIGTERM, shutting down
`