Email notifications

已查看 37 次
跳至第一个未读帖子

Alex Bredikin

未读,
2024年3月28日 13:01:333月28日
收件人 QATrack+
Hello all,

I am trying to set up email notifications for QATrack+. I followed the instructions on this page from the docs: https://docs.qatrackplus.com/en/stable/install/config.html?#email-host-settings

For the EMAIL_HOST_PASSWORD, I tried both the Gmail account password AND using a Generated App Password. In addition, I restarted both the Django server, as well as the Django Q cluster task in Windows.

In either case, whenever I perform an action that would cause an email to be sent (such as completing a test list or logging a fault), the system appears to stop loading (i.e. the little wheel in the web browser just keeps spinning as if something is trying to load, but it never actually loads anything; I have to kill the server and then restart it). An email never sends. 

My institution allows users access to gmail.com, but I am wondering if there is something that the IT network team set up to block this kind of activity. So, I'm trying to see if there is anything else I can troubleshoot before assuming it is an impassable IT restriction.

Anyone else had similar issues? I am on version 3.1.1.3.

Thank you,
Alex

Randle Taylor

未读,
2024年3月28日 14:41:133月28日
收件人 Alex Bredikin、QATrack+
HI Alex,
In local_settings.py I would set:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'your...@gmail.com'
EMAIL_HOST_PASSWORD = "your-generated-app-password"
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_USE_SSL = False

Then to check whether emails work you can open PowerShell, activate your virtualenv then do e.g.:

python manage.py shell_plus
from django.core.mail import send_mail
send_mail("Subject", "Message",   "your...@gmail.com",  ["some.re...@somedomain.com"],    fail_silently=False)

That'll give you a better idea of what is failing. (note if you change your local_settings.py you'll need to exit the shell then open a new one)

Randy
--
You received this message because you are subscribed to the Google Groups "QATrack+" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qatrack+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qatrack/30681859-1950-4acf-a2af-f16061062892n%40googlegroups.com.

Alex Bredikin

未读,
2024年4月1日 09:02:454月1日
收件人 Randle Taylor、QATrack+
Thanks for these suggestions, Randy. Unfortunately, I haven't been able to make progress. When I try running the send_mail function, I get the same issue - the console seems to hang up, I don't get any error messages. In PowerShell, I can successfully use Test-NetConnection smtp.gmail.com -p 587, so I'm surprised send_mail is "failing".

I'll take any other suggestions anyone may have but might have to put this one on the back burner.

Thank you,
Alex



回复全部
回复作者
转发
0 个新帖子