adamant-refrigerator-93887
06/01/2024, 7:16 AMchilly-king-10285
06/01/2024, 7:16 AMchilly-king-10285
06/01/2024, 7:17 AMbash echo "Your custom template" | base64
or use an online tool like https://www.base64encode.org/. 2. Add your Base64-encoded custom message templates to the config. Don't forget to add base64://
before the encoded template. Here is an example of how to do it: yaml 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: {}
3. Upload the edited config: bash ory update identity-config <project-id> --file updated_config.yaml
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 details, 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/01/2024, 7:19 AMchilly-king-10285
06/01/2024, 7:19 AMchilly-king-10285
06/01/2024, 7:20 AM<smtps://test:test@mailslurper:1025/?skip_ssl_verify=true>
and <base64://...>
with your actual values. Also, ensure that your base64 encoded strings do not contain any line breaks, as they can cause issues. Here is how your configuration should look like: 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>==
For more details, 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/01/2024, 7:25 AMchilly-king-10285
06/01/2024, 7:25 AMchilly-king-10285
06/01/2024, 7:25 AMconnection_uri
field. Make sure the server is reachable and the credentials are correct. 2. Base64 Encoding: Ensure that your base64 encoded strings are correct and they decode to the expected HTML and plaintext templates. You can use online tools to verify your base64 encoding. 3. Email Delivery Issues: If the email's status is Sent
, but it did not arrive, please check the spam folder or the logs of your custom SMTP server (if configured). You can view outgoing messages on the Monitoring → Email Delivery page in the [Ory Console](https://console.ory.sh/projects/current/email-delivery). 4. Configuration Update: Make sure you've updated the configuration correctly using the ory update identity-config <project-id> --file updated_config.yaml
command. 5. Unsupported Methods: In the Ory Network, only Base64-encoded templates are supported. http://
or file://
URIs are not supported. If you provide custom templates using unsupported methods, the system uses the default templates. If you're still facing issues, you might want to refer to the [Ory documentation](https://www.ory.sh/docs/kratos/emails-sms/custom-email-templates#using-custom-message-templates) or seek help from the Ory community.adamant-refrigerator-93887
06/01/2024, 7:26 AMchilly-king-10285
06/01/2024, 7:26 AMchilly-king-10285
06/01/2024, 7:27 AMory list projects
command. Here is how you can do it: bash ory list projects
This command will list all available projects and their IDs. You can find the project_id
in the output of this command. For more details, you can refer to the [Ory documentation](https://www.ory.sh/docs/guides/gitops#ory-identities-configuration).adamant-refrigerator-93887
06/01/2024, 7:27 AMchilly-king-10285
06/01/2024, 7:27 AMchilly-king-10285
06/01/2024, 7:28 AMory
command but your system doesn't recognize it. This could be because the Ory CLI is not installed or not added to your system's PATH. To install the Ory CLI, you can follow these steps based on your operating system: For Linux: bash bash <(curl <https://raw.githubusercontent.com/ory/meta/master/install.sh>) -d -b . kratos <version-you-want> sudo mv ./kratos /usr/local/bin/ kratos help
For macOS: bash brew install ory/tap/kratos kratos help
For Windows: bash scoop bucket add ory <https://github.com/ory/scoop.git> scoop install kratos kratos help
Replace <version-you-want>
with the version of Ory Kratos you want to install. After installation, you should be able to use the ory
command. If you're still having issues, make sure that the Ory CLI binary is correctly added to your system's PATH. For more details, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/install).adamant-refrigerator-93887
06/01/2024, 10:42 AMchilly-king-10285
06/01/2024, 10:42 AMchilly-king-10285
06/01/2024, 10:42 AMidentity-config.yaml
or config.yml
). 2. Locate the courier
section and then the templates
subsection. 3. Under the recovery
section, replace the html
and plaintext
fields under invalid
and valid
with your base64 encoded strings. Make sure to prepend the strings with base64://
. Here's an example of how your configuration should look: yaml courier: smtp: from_name: MyProject via Ory templates: recovery: invalid: email: body: html: "<base64://QWxsIHByYWlzZSBpcyBmb3IgQWxsYWgsIHBsZWFzZSB2ZXJpZnkgeW91ciBhY2NvdW50IGJ5IGNsaWNraW5nIHRoZSBmb2xsb3dpbmcgbGluazp7eyAuUmVjb3ZlcnlDb2RlIH19Cgo8YSBocmVmPSJ7eyAuUmVjb3ZlcnlDb2RlIH19Ij57eyAuUmVjb3ZlcnlDb2RlIH19PC9hPg>==" plaintext: "<base64://SGksIHBsZWFzZSByZWNvdmVyIGFjY2VzcyB0byB5b3VyIGFjY291bnQgYnkgZW50ZXJpbmcgdGhlIGZvbGxvd2luZyBjb2RlOnt7LlJlY292ZXJ5Q29kZX19Cg>==" valid: email: body: {}
4. Save the configuration file. 5. Upload the edited config using the Ory CLI: bash ory update identity-config <project-id> --file identity-config.yaml
Replace <project-id>
with your actual project ID. For more details, 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/01/2024, 10:43 AMchilly-king-10285
06/01/2024, 10:43 AMchilly-king-10285
06/01/2024, 10:43 AMlist projects
command. Here's how you can do it: bash ory list projects
This command will list all your projects along with their details, including the project ID. For more details, you can refer to the [Ory documentation](https://www.ory.sh/docs/guides/cli/cli-basics#create-a-project).adamant-refrigerator-93887
06/01/2024, 10:45 AMchilly-king-10285
06/01/2024, 10:45 AMchilly-king-10285
06/01/2024, 10:45 AMory
command but your system doesn't recognize it. This could be because the Ory CLI is not installed or not added to your system's PATH. To install the Ory CLI, you can follow these steps based on your operating system: For Linux: bash bash <(curl <https://raw.githubusercontent.com/ory/meta/master/install.sh>) -d -b . kratos <version-you-want> sudo mv ./kratos /usr/local/bin/ kratos help
For macOS: bash brew install ory/tap/kratos kratos help
For Windows: bash scoop bucket add ory <https://github.com/ory/scoop.git> scoop install kratos kratos help
Replace <version-you-want>
with the version of Ory Kratos you want to install. After installation, you should be able to use the ory
command. If you're still having issues, make sure that the Ory CLI binary is correctly added to your system's PATH. For more details, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/install).