Also i have another problem with email templates i...
# ory-selfhosting
n
Also i have another problem with email templates i have created directory with my custom template for valid recovery email and set it like this
Copy code
Hi,

please recover access to your account by clicking the following link:

<a href="{{ .RecoveryURL }}">{{ .RecoveryURL }}</a>

{{ .Identity.traits.name.first }}

</br>
test
in kratos.yml i have set props for courier:
Copy code
courier:
  smtp:
    connection_uri: <smtps://test:test@mailslurper:1025/?skip_ssl_verify=true>
    from_address: test@custom.domain
  template_override_path: /conf/courier-templates
but when i sent recovery email i'm getting the following error:
Copy code
kratos_1| time=2022-02-03T20:31:29Z level=error msg=Unable to get email body from template. func=<http://github.com/ory/kratos/courier.(*Courier).DispatchMessage|github.com/ory/kratos/courier.(*Courier).DispatchMessage> file=/home/ory/courier/courier.go:185 audience=application error=map[message:template: recovery/valid/email.body.gotmpl:7:12: executing "recovery/valid/email.body.gotmpl" at <.Identity.traits.name.first>: can't evaluate field Identity in type *template.RecoveryValidModel trace:
w
I need to bump this as we are having the same issue.
Template email:
Copy code
Hi {{ .Identity.traits.email }},

Please verify your account by clicking the following link:

{{ .VerificationURL }}
Copy code
"message": "template: verification/valid/email.body.plaintext.gotmpl:1:15: executing \"verification/valid/email.body.plaintext.gotmpl\" at \u003c.Identity.traits.email\u003e: can't evaluate field Identity in type *template.VerificationValidModel"
ok it appears it was a versioning issue. The helm charts aren’t up to date with the latest alpha release.
w
hi there, yes, the charts allow you to setup a image version you want, we update the image tags in charts when a major release/change has been done
w
Yes, yes it does.