Re: Defining a custom email backend

2021-09-23 Thread Sujata Aghor
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

Re: Defining a custom email backend

2021-09-22 Thread sum abiut
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

Re: Defining a custom email backend

2021-09-22 Thread Sujata Aghor
*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

Re: Defining a custom email backend

2021-09-22 Thread sum abiut
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