Hi there, I am developing a new theme and intend to offer the possibilty to enable Kirby’s password reset. My site blueprint is already working but I have problems to implement the dynamic SMTP settings. How can I achieve this using config.php?
config.php (excerpt)
'auth' => [
'methods' => ['password', 'password-reset'],
'trials' => 10
],
'email' => [
'transport' => [
'type' => 'smtp',
'host' => 'TBD',
'port' => TBD,
'security' => 'TBD',
'auth' => true,
'username' => 'TBD',
'password' => 'TBD',
],
'from' => 'TBD'
],
site.yml (excerpt)
authentication:
label: Authentication
icon: key-2-line
columns:
left:
width: 1/2
fields:
passwordreset:
label: Password Reset
type: headline
resetpassword:
label: false
type: toggle
text:
- "No"
- "Yes"
help: Enable password recovery by email
right:
width: 1/2
fields:
smtp:
label: Simple Mail Transfer Protocol
type: headline
when:
resetpassword: true
email:
label: Email address
type: email
required: true
help: Used to send a login code to the user
when:
resetpassword: true
username:
label: Username
type: text
when:
resetpassword: true
password:
label: Password
type: text
when:
resetpassword: true
host:
label: Host
type: text
required: true
when:
resetpassword: true
port:
label: Port
type: number
width: 1/2
when:
resetpassword: true
security:
label: security
type: toggles
options:
- SSL
- TLS
width: 1/2
when:
resetpassword: true