Docker SMTP Server for Django Container SMTP backend Docker SMTP Server for Django Container SMTP backend docker docker

Docker SMTP Server for Django Container SMTP backend


The email backend is just an imported module. You can just use it like it is described in the docs: https://docs.djangoproject.com/en/1.11/topics/email/#email-backends

Before that, you have to configure the data for the smtp server. You just have to configure the settings, like your smtp host, username and password, etc. Here are the docs to configure it: https://docs.djangoproject.com/en/1.11/topics/email/#smtp-backendYou can use an existing smtp server. If you have a package with a domain you probably have a an email account included.

There is no need for another container. But you can setup your own in a a separate container. There are already some docker-ready solutions present. Here are a few:


just do changes in some file

#add it in docker_compose.ymlmaildev:image: maildev/maildevports:  - "49180:80"# add it in your settings.py file EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'EMAIL_HOST = 'maildev'EMAIL_PORT = 25# then run docker-compose up -d# when it done then run docker build -t <your tag Name> .happy coding.......

refrence link:[1]: https://melvinkoh.me/configure-and-send-email-in-django-for-both-development-and-production-cjye4y0l7000nuns1m43vstaq