<@U04UQ68083H> I have created django project using...
# ory-copilot
f
@chilly-king-10285 I have created django project using cookiescutter but when I integrate django-ory-auth into it. the mail is not being sent?
c
A message from kapa.ai
If you're having trouble with email delivery in your Django project using Ory, there are a few things you can check: 1. Monitoring Email Delivery: You can view outgoing messages on the Monitoring → Email Delivery page in the [Ory Console](https://console.ory.sh/projects/current/email-delivery). The
Sent
state of an email only indicates whether Ory Identities successfully "handed" off the email to the SMTP server. 2. Email Delivery Dashboard: If an email did not arrive, check the [Email Delivery](https://console.ory.sh/projects/current/email-delivery) dashboard in the Ory Console. It will show all emails sent by your project, along with its delivery state. If the Ory Network could not reach your SMTP server or there was an authentication failure, it will be indicated here along with the error message. 3. Check Spam Folder or SMTP Server Logs: 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). 4. Emails Marked as Spam: If you're using a custom domain, but no custom SMTP server, some (or all) emails the Ory Network sends, can be marked as spam or blocked by the email providers of your users, such as Gmail. This is due to the phishing/spam protection these providers have in place to protect their users. In this case, it is recommended to set up a custom SMTP server if you use custom domains. For more detailed troubleshooting, refer to the [Ory documentation](https://www.ory.sh/docs/kratos/emails-sms/sending-emails-smtp#troubleshooting).
f
@chilly-king-10285 i am not seeing any emails in the email delivery
c
A message from kapa.ai
If you're not seeing any emails in the Email Delivery dashboard, it could be due to a few reasons: 1. SMTP Server Connection: The Ory Network might not be able to reach your SMTP server. This could be due to network issues or incorrect SMTP server configuration. 2. SMTP URL Format: Ensure that your SMTP URL is correctly formatted. If your username or password contains special characters, they must be URL-encoded. Incorrect SMTP URLs are a common issue. For example, these are incorrect URLs:
Copy code
<smtp://username:pass/[[email> protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>):587   <smtp://user%name:pass$word@some-email-service.com:587>
To fix the issue, URL encode the username and password. You can use JavaScript or an online tool like [urlencoder.org](https://www.urlencoder.org). Be cautious when providing your credentials in any websites or web tools for encoding. If you don't fully trust the provider, consider encoding the credentials locally. Here are examples of properly URL-encoded SMTP URLs:
Copy code
<-smtp://username:pass/[[email> protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>):587   <+smtp://username:pass%[[email> protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>):587      <-smtp://user%name:[[email> protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>):587   <+smtp://user%25name:pass%[[email> protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>):587
For more details, refer to the [Ory documentation](https://www.ory.sh/docs/troubleshooting/smtp-courier-OTA-112022-01). 3. Message Retries: The
message_retries
parameter defines the number of times the mail courier attempts to deliver a message. 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. You can check this setting in your configuration file:
Copy code
# kratos -c path/to/my/kratos/config.yml serve   courier:    message_retries: 5
For more details, refer to the [Ory documentation](https://www.ory.sh/docs/kratos/self-hosted/mail-courier-selfhosted#error-handling). If you've checked all of these and are still having issues, it might be best to reach out to Ory's support for further assistance.