Emails are handled by Django.
Django has various backends:
The default assumes you have a SMTP server on-board and the email settings in settings.py are used. I have not tried to set up an email server locally and when testing locally I use one of the other backends - in settings.py:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
EMAIL_BACKEND = ‘django.core.mail.backends.dummy.EmailBackend’
Setting up an email server is fairly complicated - I have given descriptions for doing this when deploying to Heroku or AWS.
https://wrmack.github.io/helios-server-docs/site/deploy_heroku_walkthrough/
If you are using Ubuntu, your version might come with Sendmail built in - I am not sure. If so, it is then a matter of ensuring the email settings in settings.py match Sendmail’s configuration.
If you have an email server running it can be tested under Django:
python3 manage.py shell
>>> from django.core.mail import send_mail
>>> send_mail('Subject', 'Message', ’send_email_address', [‘receiver_email_address'])