<@U04UQ68083H> is there any way to limit number of...
# ory-copilot
w
@chilly-king-10285 is there any way to limit number of code resend attempts in Kratos ?
c
A message from kapa.ai
In Ory Kratos, there is a parameter called
message_retries
that defines the number of times the mail courier attempts to deliver a message. This setting applies to both the SMTP server and the SMS gateway. By default,
message_retries
is set to
5
. If the courier can't deliver the message within the number of retries specified in
message_retries
, the message gets the
Abandoned
status and the courier stops trying to deliver it. Here is how you can set it in your configuration file:
Copy code
yaml # kratos -c path/to/my/kratos/config.yml serve   courier:     message_retries: 5
Please note that this setting is for message delivery attempts and not specifically for code resend attempts. There is no specific setting in the provided knowledge sources for limiting code resend attempts. For more details, you can refer to the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/self-hosted/mail-courier-selfhosted#error-handling).