<@U04UQ68083H> When using multiple custom domains,...
# ory-copilot
b
@chilly-king-10285 When using multiple custom domains, is it possible to configure multiple custom email servers?
c
A message from kapa.ai
Yes, it is possible to configure multiple custom email servers when using multiple custom domains with Ory. This is particularly important because when using a custom domain in the Ory Network without a custom SMTP server, links inside the automated Ory Identities emails won't match the domain these emails were sent from. Some email providers, such as Gmail, might interpret this as a phishing attack and mark the email as spam, or block it entirely. To prevent this, you should configure a custom SMTP server that matches at least the root domain of your custom domain. For example, if you configured the custom domain
<http://ory.your-custom-domain.com|ory.your-custom-domain.com>
, you should also configure an email server that lives under
<http://your-custom-domain.com|your-custom-domain.com>
. You can learn how to set up a custom SMTP server on the Ory Network by reading the guide on [sending emails using your SMTP server](https://www.ory.sh/docs/kratos/emails-sms/sending-emails-smtp#send-emails-using-your-smtp-server). If you are using multiple custom domains, you would need to set up a custom SMTP server for each domain to ensure that the emails sent from each domain match the domain they were sent from. For example, if you have three domains:
<http://ory.domain1.com|ory.domain1.com>
,
<http://ory.domain2.com|ory.domain2.com>
, and
<http://ory.domain3.com|ory.domain3.com>
, you would need to set up three custom SMTP servers: one for
<http://domain1.com|domain1.com>
, one for
<http://domain2.com|domain2.com>
, and one for
<http://domain3.com|domain3.com>
. This way, the emails sent from each domain will match the domain they were sent from, reducing the likelihood of them being marked as spam or blocked by email providers. Source: [Automated Emails](https://www.ory.sh/docs/guides/custom-domains#automated-emails)