I tried to send emails in a class with ~130 students enrolled.
I have tested this now by creating a plugin per the instructions. [36 1mlms-worker_1 |[0m smtplib.SMTPSenderRefused: (421, b'4.7.0 Try again later, closing connection. [36 1mlms-worker_1 |[0m raise SMTPSenderRefused(code, resp, from_addr) [36 1mlms-worker_1 |[0m (from_email, recipients, message.as_bytes(linesep='\r\n')) [36 1mlms-worker_1 |[0m File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/backends/smtp.py", line 126, in _send [36 1mlms-worker_1 |[0m sent = self._send(message) [36 1mlms-worker_1 |[0m File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/backends/smtp.py", line 110, in send_messages [36 1mlms-worker_1 |[0m File "/openedx/edx-platform/lms/djangoapps/bulk_email/tasks.py", line 581, in _send_course_email [36 1mlms-worker_1 |[0m raise send_exception # pylint: disable=raising-bad-type [36 1mlms-worker_1 |[0m File "/openedx/edx-platform/lms/djangoapps/bulk_email/tasks.py", line 334, in send_course_email [36 1mlms-worker_1 |[0m return wrapped_function(*args, **kwargs) [36 1mlms-worker_1 |[0m File "/openedx/venv/lib/python3.8/site-packages/edx_django_utils/monitoring/internal/code_owner/utils.py", line 179, in new_function
[36 1mlms-worker_1 |[0m File "/openedx/venv/lib/python3.8/site-packages/celery/app/trace.py", line 704, in _protected_call_ [36 1mlms-worker_1 |[0m R = retval = fun(*args, **kwargs) [36 1mlms-worker_1 |[0m File "/openedx/venv/lib/python3.8/site-packages/celery/app/trace.py", line 412, in trace_task [36 1mlms-worker_1 |[0m Traceback (most recent call last): My secondary question is, when an email sending errors out like this, is there any way to pick it back up again, or do I just have to accept that ~120 people will get the same message again? (if I can find a way to resolve this issue. So my question is: is there a way to slow down mail sending so that it doesn’t get blocked?
Automatic email sender gmail without any limits how to#
They then showed me how to look up a log and it indeed seemed to be sending at a rate of about 2 per second. I contacted google support and confirmed the sending account itself is not blocked for exceeding the daily limit, and they suggested it was probably sending too fast, and that you’re only allowed to connect once per second. The logs show an SMTP error 421 “try again later” (see below). But it said it successfully sent to ~120 of them, before it errored out for the rest. Today I tried to send a bulk email to about 1300 class participants. I talked with google customer service the other day and they assured me that it’s possible for an account to send to up to 2000 emails per day.