Smtp mailer does not update host

I use ttrss dynamic docker.
I update config.php in the docker app container to have the following variables set

	define('SMTP_FROM_NAME', 'Tiny Tiny RSS');
	define('SMTP_FROM_ADDRESS', '[email protected]');
	define('SMTP_SERVER', 'smtp-mail.outlook.com');
	define('SMTP_LOGIN', '[email protected]');
	define('SMTP_PASSWORD', 'password');
	define('PLUGINS', 'auth_internal, note, nginx_xaccel, mailer_smtp');

I run: docker-compose down && docker-compose rm && docker compose up --build

The log is:

updater_1  | [08:35:55/21] Sending digest for UID:2 - 
updater_1  | sendmail: can't connect to remote host (127.0.0.1): Connection refused
updater_1  | [08:35:57/21] RC=
updater_1  | [08:35:57/21] All done.

Why does it try to send mail to 127.0.0.1?? I do not receive any mail.

Did I miss a configuration? I read everything

In the logs:

1. plugins.local/mailer_smtp/init.php(76): ttrss_error_handler(2, Invalid argument supplied for foreach(), plugins.local/mailer_smtp/init.php, 76, Array)
2. classes/mailer.php(32): hook_send_mail([Mailer], Array)
3. classes/digest.php(65): mail(Array)
4. classes/rssutils.php(183): send_headlines_digests()
5. update.php(252): update_daemon_common(50)
		4:35
E_WARNING (2)	plugins.local/mailer_smtp/init.php:76	Invalid argument supplied for foreach()

It is this git.tt-rss .org/fox/ttrss-mailer-smtp/src/master/init.php#L76

			foreach ($params['headers'] as $header) {
				$phpmailer->addCustomHeader($header);
			}

try setting it to hostname:port (port being 587 or 25).

It’s 587, but it does not work.
I added:

define('SMTP_SERVER', 'smtp-mail.outlook.com:587');
define('SMTP_SECURE', 'tls');

I tried with out define('SMTP_SECURE', 'tls'); but it does not work

I also added if ($params['headers']) before the foreach and the error disappeared

that’s not really related though. not sure why SMTP_SERVER is ignored. i’ll make a note to take a look at this later.

If you need more logs just ask

I believe when the remote server does not accept the connect it defaults to 127.0.0.1
It is better if there is a log when this happens
I fixed the account details and it works

this is a rather strange behavior on behalf of phpmailer, i wonder if its documented anywhere.