adamant-refrigerator-93887
06/03/2024, 8:02 AMchilly-king-10285
06/03/2024, 8:02 AMchilly-king-10285
06/03/2024, 8:02 AMkratos.yml configuration, you need to replace the existing base64 encoded templates with your own. Here's how you can do it: 1. Replace the existing base64 encoded templates in the kratos.yml file with your own. Your kratos.yml file should look something like this: yaml courier: smtp: connection_uri: <smtps://test:test@mailslurper:1025/?skip_ssl_verify=true> from_name: MyProject via Ory templates: recovery: invalid: email: body: html: "<base64://QWxsIHByYWlzZSBpcyBmb3IgQWxsYWgsIHBsZWFzZSB2ZXJpZnkgeW91ciBhY2NvdW50IGJ5IGNsaWNraW5nIHRoZSBmb2xsb3dpbmcgbGluazp7eyAuUmVjb3ZlcnlDb2RlIH19Cgo8YSBocmVmPSJ7eyAuUmVjb3ZlcnlDb2RlIH19Ij57eyAuUmVjb3ZlcnlDb2RlIH19PC9hPg>==" plaintext: "<base64://SGksIHBsZWFzZSByZWNvdmVyIGFjY2VzcyB0byB5b3VyIGFjY291bnQgYnkgZW50ZXJpbmcgdGhlIGZvbGxvd2luZyBjb2RlOnt7LlJlY292ZXJ5Q29kZX19Cg>==" valid: email: body: html: "<base64://QWxsIHByYWlzZSBpcyBmb3IgQWxsYWgsIHBsZWFzZSByZWNvdmVyIGFjY2VzcyB0byB5b3VyIGFjY291bnQgYnkgZW50ZXJpbmcgdGhlIGZvbGxvd2luZyBjb2RlOnt7LlJlY292ZXJ5Q29kZX19Cgo8YSBocmVmPSJ7eyAuUmVjb3ZlcnlDb2RlIH19Ij57eyAuUmVjb3ZlcnlDb2RlIH19PC9hPg>==" plaintext: "<base64://SGksIHBsZWFzZSByZWNvdmVyIGFjY2VzcyB0byB5b3VyIGFjY291bnQgYnkgZW50ZXJpbmcgdGhlIGZvbGxvd2luZyBjb2RlOnt7LlJlY292ZXJ5Q29kZX19Cg>==" 2. Save the changes to the kratos.yml file. Please note that in the Ory Network, you can use only Base64-encoded templates. http:// or file:// URIs are not supported. If you provide custom templates using unsupported methods, the system uses the default templates. For more information, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/emails-sms/custom-email-templates#using-custom-message-templates).adamant-refrigerator-93887
06/03/2024, 8:04 AMchilly-king-10285
06/03/2024, 8:04 AMchilly-king-10285
06/03/2024, 8:04 AMkratos.yml configuration. However, this process is not directly supported by Ory Kratos and would require additional scripting or programming to read the file contents and insert them into the configuration. Here's a general idea of how you could do it: 1. Write a script or program in your preferred language that reads the contents of your base64 files. 2. In this script, format these contents as needed for the kratos.yml configuration. 3. Use this script to generate or update your kratos.yml configuration with the base64 contents from your files. Please note that this is a general approach and the specifics will depend on your programming language and environment. For more information on how to use custom email templates in Ory Kratos, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/emails-sms/custom-email-templates#using-custom-message-templates).adamant-refrigerator-93887
06/03/2024, 8:16 AMchilly-king-10285
06/03/2024, 8:16 AMchilly-king-10285
06/03/2024, 8:17 AMfile:// URI scheme is not supported for base64 encoded templates. The correct way is to include the base64 encoded string directly in the configuration file under the html and plaintext keys. Here's an example: yaml courier: smtp: from_name: MyProject via Ory templates: recovery: valid: email: body: html: "<base64://ENCODED_HTML_TEMPLATE>" plaintext: "<base64://ENCODED_PLAINTEXT_TEMPLATE>" In this example, ENCODED_HTML_TEMPLATE and ENCODED_PLAINTEXT_TEMPLATE should be replaced with your base64 encoded templates. For more information, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/emails-sms/custom-email-templates#using-custom-message-templates).