Django mails not being saved (File backend)

As you can see in the code there's a lot of raises: https://github.com/django/django/blob/stable/2.1.x/django/core/mail/backends/filebased.py#L13

So if with your settings, and the correct permissions on your folder you cannot see email or errors maybe there's some settings that overwrite the two settings you posted here.

Check again your local setting and be sure there's only one EMAIL_BACKEND declared.


Because there is no error, the directory exists and there are still no files created in your specified directory, it is possible that the code runs and creates the files but in a different directory.

What is your file_path keyword set to when you create a connection?

File backend

The file backend writes emails to a file. A new file is created for each new session that is opened on this backend. The directory to which the files are written is either taken from the EMAIL_FILE_PATH setting or from the file_path keyword when creating a connection with get_connection().

To specify this backend, put the following in your settings:

EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
EMAIL_FILE_PATH = '/tmp/app-messages' # change this to a proper location

Django Docs File Backend