<@U04UQ68083H> Can some emails be disabled in Ory ...
# ory-copilot
s
@chilly-king-10285 Can some emails be disabled in Ory Network while others are enabled?
c
A message from kapa.ai
Yes, Ory Network allows you to customize the behavior of emails based on various conditions. For instance, you can enable or disable sending attempted verification notifications or attempted recovery notifications to unregistered addresses. This feature is used to prevent account enumeration attacks. To enable sending attempted verification notifications, you can follow these steps: 1. Go to [Ory Console](https://console.ory.sh/) → Email Verification to enable and toggle Notify unknown recipients on. 2. Download the Ory Identities configuration from your project and save it to a file:
Copy code
bash ## List all available projects   ory list projects      ## Get config   ory get identity-config {project-id} --format yaml > identity-config.yaml
3. Set
notify_unknown_recipients
to
true
in the
identity-config.yaml
file. 4. Update the Ory Identities configuration using the file you worked with:
Copy code
bash ory update identity-config {project-id} --file identity-config.yaml
The same process can be followed for enabling or disabling attempted recovery notifications, but you would go to [Ory Console](https://console.ory.sh/) → Account Recovery instead. Sources: - [Attempted verification notifications](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation#attempted-verification-notifications) - [Attempted recovery notifications](https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset#attempted-recovery-notifications)
s
@chilly-king-10285 What are all the emails that Ory potentially sends out to users?
c
A message from kapa.ai
Ory Network sends out emails to users for various actions. Here are some of the emails that Ory potentially sends out: 1. Account Recovery: When a user initiates the account recovery process, Ory sends an email with a recovery link or code. The user can use this to reset their password and regain access to their account. [Source](https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset) 2. Address Verification: When a user registers or changes their email address, Ory sends an email with a verification link or code. The user must click the link or enter the code to verify their email address. [Source](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation) 3. Automated Emails: Ory sends automated emails for certain actions a user can take, such as account recovery or address verification. These emails contain links that point to the user's custom domain. [Source](https://www.ory.sh/docs/guides/custom-domains#automated-emails) Please note that the content and behavior of these emails can be customized according to your needs. For example, you can configure Ory to use a custom SMTP server or an HTTP server to send these emails. You can also customize the payload of the HTTP request using a Jsonnet template. [Source](https://www.ory.sh/docs/kratos/emails-sms/sending-emails-smtp#payload)
s
@chilly-king-10285 If I only want emails to send from ory for the Login With Email Code flow, is it possible to have those enabled and all other emails disabled?
c
A message from kapa.ai
Yes, it is possible to customize the email behavior in Ory. However, the specific ability to disable all emails except for the "Login With Email Code" flow is not explicitly mentioned in the provided sources. Ory allows you to customize the email templates for various flows such as account recovery, address verification, login code, and registration code. This suggests that you may be able to disable certain emails by not providing a template for those specific flows. However, it's important to note that some emails, like the verification email, are integral to the security and functionality of the system, and disabling them might affect the user experience and the security of your application. For more detailed information on how to customize the email behavior in Ory, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/emails-sms/custom-email-templates).