Bulk e-mail failure (gmail smtp)

205 views
Skip to first unread message

Rui Vilão

unread,
Mar 16, 2015, 5:21:24 PM3/16/15
to edx-...@googlegroups.com
Hi,

I'm having some problems when e-mailing students in courses. It seems that for some reason while the task is executing, google decides to close the connection. In the sent e-mail history for each course I can check that some e-mails were not sent (e.g.: 94 sent/129 failed, etc).

Does anyone have a clue on what might be happening? If this is some limitation on google's side (number of connections/number of e-mails sent in a period of time, etc) is there a way to overcome this? Possibly by using bcc instead of a since e-mail only?

Stacks below.

Thanks in advance,
Rui

--

[2015-02-25 06:50:29,105: ERROR/MainProcess] bulk_email.tasks.send_course_email[f878f7c8-fc38-49bb-b925-492cc549e155]: Send-email task f878f7c8-fc38-49bb-b925-492cc549e155 for email 27: failed unexpectedly!
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/lms/djangoapps/bulk_email/tasks.py", line 317, in send_course_email
subtask_status,
File "/edx/app/edxapp/edx-platform/lms/djangoapps/bulk_email/tasks.py", line 581, in _send_course_email
connection.close()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 64, in close
self.connection.quit()
File "/usr/lib/python2.7/smtplib.py", line 754, in quit
res = self.docmd("quit")
File "/usr/lib/python2.7/smtplib.py", line 384, in docmd
self.putcmd(cmd, args)
File "/usr/lib/python2.7/smtplib.py", line 334, in putcmd
self.send(str)
File "/usr/lib/python2.7/smtplib.py", line 326, in send
raise SMTPServerDisconnected('please run connect() first')
SMTPServerDisconnected: please run connect() first

2015-02-25 06:50:29,270 ERROR 28996 [celery.worker.job] log.py:246 - Task bulk_email.tasks.send_course_email[f878f7c8-fc38-49bb-b925-492cc549e155] raised exception: SMTPServerDisconnected('please run connect() first',Traceback (most recent call last): 

File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/task/trace.py", line 228, in trace_task
R = retval = fun(*args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/task/trace.py", line 415, in __protected_call__
return self.run(*args, **kwargs)
File "/edx/app/edxapp/edx-platform/lms/djangoapps/bulk_email/tasks.py", line 317, in send_course_email
subtask_status,
File "/edx/app/edxapp/edx-platform/lms/djangoapps/bulk_email/tasks.py", line 581, in _send_course_email
connection.close()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 64, in close
self.connection.quit()
File "/usr/lib/python2.7/smtplib.py", line 754, in quit
res = self.docmd("quit")
File "/usr/lib/python2.7/smtplib.py", line 384, in docmd
self.putcmd(cmd, args)
File "/usr/lib/python2.7/smtplib.py", line 334, in putcmd
self.send(str)
File "/usr/lib/python2.7/smtplib.py", line 326, in send
raise SMTPServerDisconnected('please run connect() first')
SMTPServerDisconnected: please run connect() first

Nilesh Londhe

unread,
Mar 16, 2015, 5:28:30 PM3/16/15
to edx-...@googlegroups.com
My solution has been to not use Gmail instead use SMTP providers such as AWS SES, Sendmail, mandrillapp etc. 

Rui Vilão

unread,
Mar 16, 2015, 5:35:01 PM3/16/15
to edx-...@googlegroups.com
Hi,

Thanks for the fast answer. So you had the same problem and it was related to the Gmail SMTP as I understand. How can I be sure that's my problem also?

Regards,

Rui

--
You received this message because you are subscribed to a topic in the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/1e32587d-25de-4b78-9c11-8747ad32788d%40googlegroups.com.

Nilesh Londhe

unread,
Mar 16, 2015, 5:49:17 PM3/16/15
to edx-...@googlegroups.com
mandrillapp is Free up to 12k emails per month https://mandrill.com/pricing/ so I did not waste my time investigating gmail smtp issues.

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/CA%2By%3Di-D6h4XEQ9jxEGLT_pKjby4TyGcJXHU8Mm%2Byz98Dim22pQ%40mail.gmail.com.

Rui Vilão

unread,
Mar 16, 2015, 5:53:11 PM3/16/15
to edx-...@googlegroups.com
OK, Thanks again for the tips!

Regards,

Rui

Reply all
Reply to author
Forward
0 new messages