purple-intern-72952
05/02/2023, 4:46 AMchilly-king-10285
05/02/2023, 4:46 AMchilly-king-10285
05/02/2023, 4:47 AM## List all available projects ory list projects ## Get config ory get identity-config <project-id> --format yaml > identity-config.yaml
- Add your Base64-encoded custom message templates to the config: courier: smtp: from_name: MyProject via Ory templates: recovery: invalid: email: body: { "html": "<base64://ENCODED_HTML_TEMPLATE>", "plaintext": "<base64://ENCODED_PLAINTEXT_TEMPLATE>" } valid: email: body: {} verification: invalid: email: body: {} valid: email: body: {}
- Upload the edited config: ory update identity-config <project-id> --file updated_config.yaml
In self-hosted Ory Kratos instances, you can add custom templates from http://
, file://
, and base64://
URIs. You can find more information on how to configure custom email templates in self-hosted Ory Kratos instances [here](https://www.ory.sh/docs/kratos/self-hosted/mail-courier-templates#configuration). For internationalized templates, you can use in-line template definitions or separate template files. You can find examples and more information on creating translated templates [here](https://www.ory.sh/docs/kratos/emails-sms/custom-email-templates#translated-templates-i18n) and [here](https://www.ory.sh/docs/kratos/self-hosted/mail-courier-templates#translated-templates). Remember that the Identity
object is available inside the templates, allowing you to customize the content based on the recipient's identity. More information on customizing template content for specific users can be found [here](https://www.ory.sh/docs/kratos/emails-sms/custom-email-templates#customizing-template-content-for-specific-users).purple-intern-72952
05/02/2023, 4:54 AMpurple-intern-72952
05/02/2023, 4:54 AMchilly-king-10285
05/02/2023, 4:54 AMchilly-king-10285
05/02/2023, 4:55 AMpurple-intern-72952
05/02/2023, 11:59 AMchilly-king-10285
05/02/2023, 11:59 AMchilly-king-10285
05/02/2023, 12:00 PMVerificationURL
variable. Here's an example of how to include the verification URL in an HTML template: html <p>Click the following link to verify your email address:</p> <p><a href="{{ .VerificationURL }}">Verify Email</a></p>
And for a plaintext template: Click the following link to verify your email address: {{ .VerificationURL }}
The {{ .VerificationURL }}
placeholder will be replaced with the actual verification URL when the email is sent. For more information on custom email templates, refer to the following documentation: - [Custom Email Templates](https://www.ory.sh/docs/kratos/emails-sms/custom-email-templates) - [Email Templates in Self-hosted Ory Kratos](https://www.ory.sh/docs/kratos/self-hosted/mail-courier-templates)purple-intern-72952
05/02/2023, 12:28 PMchilly-king-10285
05/02/2023, 12:28 PMchilly-king-10285
05/02/2023, 12:28 PM