django, sendGrid not sending mail - django

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.

Related

Django multiple SMTP accounts

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

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.

how to enable SSL email in django?

I have in settings.py:
EMAIL_HOST = 'mail.myserver.pl'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'mymail#mail.myserver.pl'
EMAIL_HOST_PASSWORD = 'mypassword'
EMAIL_USE_TLS = False
But my server require SSL and I get AuthenticationError exception. How to enable SSL support in Django?
try this:
EMAIL_USE_SSL = True