Django multiple SMTP accounts - django

Here are the Django simple SMTP backend settings for just 1 email account
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = "mail.mysmtpserver.somewhere"
EMAIL_PORT = 587
EMAIL_HOST_USER = "my#login"
EMAIL_HOST_PASSWORD = "mypassword"
EMAIL_USE_TLS = True
How is it possible to use 2 or more email accounts on the same server instead of one?
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = "mail.mysmtpserver.somewhere"
EMAIL_PORT =587
EMAIL_HOST_USER = "my#login2"
EMAIL_HOST_PASSWORD = "mypassword2"
EMAIL_USE_TLS = True
I just need to send different emails based on the subject by different email account.
I checked the Django documentation but there was nothing

Related

django, sendGrid not sending mail

I'm trying to send mail using SendGrid on django development server.
Here are my setting:
EMAIL_HOST = 'smtp.sendgrid.net'
DEFAULT_FROM_EMAIL = 'myemail#gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_USE_SSL = False
EMAIL_HOST_USER = 'apikey'
EMAIL_HOST_PASSWORD = config('PASS')
and it is not working, it returns 1 on the terminal and nothing happens.

How to configure Django Email Back-end Settings to send email via RoundCube Webmail in production

During development, I have been using Gmail SMTP to send emails from my Django app. The Gmail settings are (settings.py):
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = 'xxxx#gmail.com'
EMAIL_HOST_PASSWORD = 'xxxxxxxxx'
However, during production, I need to change to RoundCube webmail client to allow my project to use a custom email address that matches the domain name. I have tried the following settings and many others but none of them is working. I know this is simple, but this is my first project and I don't know whether there is something I am missing.
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'mydomain.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 465
EMAIL_HOST_USER = 'accounts#mydomain.com'
EMAIL_HOST_PASSWORD = 'xxxxxxxxx'

Outlook office 365 mail SMTP email authentication doesn't work in django?

django settings config
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.office365.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'myemail#outlook.com'
EMAIL_HOST_PASSWORD = 'myPassword'
EMAIL_USE_TLS = True
EMAIL_USE_SSL = False
it shows error smtplib.SMTPAuthenticationError: (535, b'5.7.3 Authentication unsuccessful [BM1P287CA0013.INDP287.PROD.OUTLOOK.COM]')

Use email created on cpanel to send message in django

i try to make setting for send message to user when they create account or rest password ( i use all auth ) ,, but when try to create acc to ex the page just still loading , it don't do anything
how to fix it
# email message send
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST= 'mail.filltasks.live'
EMAIL_HOST_USER= 'no-reply#filltasks.live'
EMAIL_HOST_PASSWORD= 'mypass_namecheap_acc'
EMAIL_USE_TLS= True
EMAIL_PORT= 465
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
edit it do that and worked fine !!!!
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'mail.yourdomain' # for ex ,, mail.site.com
EMAIL_HOST_USER = 'no-reply#filltasks.live'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = ' the password for your email not your account'
EMAIL_PORT = 587
EMAIL_USE_SSL = False
EMAIL_USE_TLS = True
thanks for
https://stackoverflow.com/a/48750034/19161837
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'mail.yourdomain' # for ex ,, mail.site.com
EMAIL_HOST_USER = 'no-reply#filltasks.live'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = ' the password for your email not your account'
EMAIL_PORT = 587
EMAIL_USE_SSL = False
EMAIL_USE_TLS = True
thanks for
best answer

django-registration sending activation and reset emails

I am trying to send activation and reset email in Django, but I am facing some challenges.
setting.py
EMAIL_BACKEND ='django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST ='smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS =True
EMAIL_HOST_USER ='email#gmail.com'
EMAIL_HOST_PASSWORD ='gmailpasword'
EMAIL_BACKEND ='django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = ‘mail.mysite.com’
DEFAULT_FROM_EMAIL = 'noreply#mysite.com'
EMAIL_HOST_USER = 'noreply#mysite.com'
EMAIL_HOST_PASSWORD = 'my pass'
EMAIL_USE_TLS = True
EMAIL_PORT = port
The first configuration is with Gmail which work fine in development but in production (shared Linux server) it does not work at all. The second configuration with an email I set up on
webmail (cPanel) which is not working in either development or production.