User sign-up recipe - "noreply@localhost" is not a valid email address

I am following User sign-up recipe. I try it on localhost and I use MailHog to test the login code sending. I set up the email transportation as suggested here.

However every time I register a new user I get the error message “noreply@localhost” is not a valid email address.

The user is created, but no e-mail code is sent. Has anyone encountered similar problem?

Why don’t you use a valid email address?

I follow the steps in the recipe, so the form has two fields - name and email. I fill in a valid e-mail address in the registration form. The error message appears just after I click Register.

The “user creation” part works fine (user is created, I can see it in panel), but I get no e-mail message with code in MailHog and the aforementioned error is shown above the form.

Ok, you will have to set the config setting to a valid email address if your host is localhost

If this is not set, Kirby auto-creates a from address like this:

'from' => $kirby->option('', 'noreply@' . $kirby->url('index', true)->host()),

which results in the invalid email address if you are not using a proper host address.

Perfect, thank you for clarification. It works now. :+1: