I have a django-rest-framework API, and am trying to understand how sending email from it works. Suppose I'm using django.core.mail.backends.smtp.EmailBackend as email backend to send emails. Sending of an email is quite slow, and I'm wondering, if the django main thread will be blocked somehow during that time so that the other APIs would be unusable during it? Is that true? Would it be a good call to send the email in a background process created by celery for example?
Yes. Django thread is blocked for that particular user. You might want to use Celery along with Rabbit Mq for sending mail in background.
Is django thread blocked while sending email?