We can configure SMTP settings globally by defining these variables in the settings.py
:
EMAIL_HOST = 'SMTP_HOST'
EMAIL_PORT = 'SMTP_PORT'
EMAIL_HOST_USER = 'SMTP_USER'
EMAIL_HOST_PASSWORD = 'SMTP_PASSWORD'
I want to set these parameters different for each email. How can I define the SMTP settings on the fly? I mean just before the sending.