workmail with django rest framework not work

23 views Asked by At

I am try to connect my workmail to django for sending mail but it not work. Below is my django setting for my workmail.

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.mail.us-east-1.awsapps.com'
EMAIL_PORT = 465 
EMAIL_USE_SSL = True
EMAIL_USE_TLS = False
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'password'

For EMAIL_HOST_USER and EMAIL_HOST_PASSWORD is just for example. but EMAIL_HOST_PASSWORD I use the password for login to workmail, so I don't know it correct or not.

And here is the code for sending mail

from django.core.mail import send_mail
...
send_mail(subject, message, from_email, recipient_list, fail_silently=False)

Please help me to give answer or there is anything for me to try.

expect to give any suggestion and debugging

0

There are 0 answers