[Django]-Can I use sendmail for Django's send_mail?

3👍

It seems Django does not offer a backend for using sendmail locally by default.

I can see two options:

  1. Use the SMTP backend and use “localhost” for the smtp host (this is actually the default). This only works if your mailserver is configured to accept SMTP connections, and allows relaying for connections from localhost.
  2. Use a third-party backend that calls the sendmail command. A quick search turns up https://github.com/perenecabuto/django-sendmail-backend which seems like it should work.

Leave a comment