Docs / SMTP Setup - Django

SMTP setup — Django (Python)

You can get them on the token management page. For security reasons, a token is shown only once — at the moment it is created.

Edit your settings.py file:

settings.py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.postwing.app'
EMAIL_PORT = 8025
EMAIL_HOST_USER = 'your_username'
EMAIL_HOST_PASSWORD = 'your_password'
EMAIL_USE_TLS = False
EMAIL_USE_SSL = False
DEFAULT_FROM_EMAIL = 'your_from_email_address'

To test sending email:

python
from django.core.mail import send_mail

send_mail(
    'Subject',
    'Message body',
    'from@example.com',
    ['to@example.com'],
    fail_silently=False,
)