Avoid mails from reaching spam folder in cakephp 4.2

I have a site that uses cakedc users plugin, when I register a user it sends an email to the mail address I register with the user to activate it, but that mail goes to spam folder, what do I have to do so that it goes to the inbox?
This is the code of the EmailTransport section and email section and in app.php:

    'EmailTransport' => [
        'default' => [
            'className' => MailTransport::class,
            /*
             * The keys host, port, timeout, username, password, client and tls
             * are used in SMTP transports
             */
            'host' => 'localhost',
            'port' => 25,
            'timeout' => 30,
            /*
             * It is recommended to set these options through your environment or app_local.php
             */
            //'username' => null,
            //'password' => null,
            'client' => null,
            'tls' => false,
            'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
        ],
    ],
    'Email' => [
        'default' => [
            'transport' => 'default',
            'from' => 'info@cobranzassindicato.com.ar',
            /*
             * Will by default be set to config value of App.encoding, if that exists otherwise to UTF-8.
             */
            //'charset' => 'utf-8',
            //'headerCharset' => 'utf-8',
        ],
    ],

And this is the code in app_local.php:

	'EmailTransport' => [
		'localhost' => [
			'host' => 'localhost',
			'port' => 25,
			'username' => 'info@cobranzassindicato.com.ar', //eg: sample[at]gmail.com
			'password' => 'ktrdcb$!26101974', //email password
			'className' => 'default',
			'tls' => false,
			'client' => null,
			'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
		],
	]

This is not a PHP problem, is a SMTP problem, I suggest using a service like mailgun to send mails.

If you want go the hard way, I suggest enabling and configure SPF/DKIM/DMARC (all three) on the SMTP server. And check spam pages (like spamhaus) for removal, but it will take some time

In cake 3.1 I add two lines when sending mails:

->sender('mail@domain', 'human readable name')
->from(['mail@domain' => 'human readable name'])