5👍
Django uses exceptions to handle email sending problems. The value returned by send_mail
is the number of emails that were sent.
If you’re not getting an exception, it could be one of a number of things:
- You have
fail_silently
set to True (default is False) - You’re using a different email backend (smtp is the default for 1.2+, the only option for earlier versions)
- The mail is actually being sent, but something else is wrong (email server, bad email address, spam folders, gmail self-sent mail hiding etc)
4👍
Use django-mailer. It puts the emails in the database and uses a cron-jobbed management command to send it out. It will help you track this issue down, improve your app response time, and also make your life easier.
- [Django]-How do I load image to React from Django REST API?
- [Django]-Check if the file format is different with the file name extension in Python, Javascript?
- [Django]-Django default foreign key value for users
1👍
I would also suggest to use exceptions to find out whether email was sent or not.
If you haven’t time or option to set up an email server I would suggest to use django+gmail. U can create a ‘fake’ gmail account (create another one if you already own gmail-acc, it could be ‘baned’) and use its SMTP as a opportunity to send emails, even if you’re working with django’s development server (localy). How to is here
- [Django]-Failing fixture load: DoesNotExist: … matching query does not exist
- [Django]-Resize image in the views and load it in the templates in django
- [Django]-Django: 'User' object has no attribute 'user'
- [Django]-What's the meaning of including 'random salt' in password hashing of django framework?
- [Django]-Does Neomodel support modelform? If so, why isn't it picking up default meta attributes / how do I set them?