User Registration after code verification

I have been trying to set up a page where users can register after authentication using an emailed code.
I have been following the instructions in

I can’t get the emailed code to arrive in an inbox, and despite this the user is listed in the panel.

Can anyone advise where I am going wrong?

This is my config.php code…

return [
	'debug' => true,
  'panel' =>[
    'install' => true

  // other settings
  'email' => [
    // see
    'transport' => [
      'type' => 'smtp',
      'host' => '',
      'port' => 465,
      'security' => true
  // see
  'auth' => [
    'methods' => ['password', 'code']

Is that a valid SMTP host? Are you trying this locally or on a server?

I am trying on a server and the host value I am using is

But does your server have/support SMTP?

Yes, it does

First thing I’d try: Try sending an email independent of user registration with those settings using $kirby->email(). Does this work?

If not, then those settings are probably not correct.

If it does work, then there’s probably something wrong in the rest of your code.

In that case, I’d install MailHog locally and debug where it’s going wrong.

I finally got there by adding username and password to the config settings.
Thanks everyone for pointing me in the right direction.