Got my answer here -
https://stackoverflow.com/questions/43857594/django-set-e-mail-settings-in-view/43881974#43881974
Setting up values for connection object from database for specific reseller.
Thanks
On Thu, Sep 23, 2021 at 11:09 AM Sujata Aghor
wrote:
> *settings.py : *
> DEFAULT_FROM_EMAIL
You can create your own connection and then pass to send_mail()
connection = get_connection(host=my_host,
port=my_port,
username=my_username,
password=my_password,
use_tls=my_use_tls)
s
*settings.py : *
DEFAULT_FROM_EMAIL = '*'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = ***
EMAIL_HOST_USER = '*"
EMAIL_HOST_PASSWORD = '***"
*script.py :*
from_email = DEF
If you don't mind sharing your code here.
cheers,
On Thu, Sep 23, 2021 at 4:17 PM Sujata Aghor
wrote:
> Hello Everyone,
> I want to use different values of - EMAIL_HOST_USER & EMAIL_HOST_PASSWORD
> for each of my users. I will take those values from database and not from
> settings.py
>
> In dj
4 matches
Mail list logo