Error sending via gmail to invalid email address
mhammond opened this issue · comments
Found in production logs and reproduced here. Attempt to share a link to an address "foo.bar", which is obviously invalid. F1 displays the "goofed up" message with the following in the logs:
14:30:20,595 ERROR [linkdrop.lib.helpers] [worker 2] ((,), {}) failed Traceback (most recent call last): File "O:\src\mm\f1\work\linkdrop\lib\helpers.py", line 128, in json_exception_response return func(*args, **kwargs) File "O:\src\mm\f1\work\linkdrop\controllers\send.py", line 175, in send result, error = provider.api(acct).sendmessage(message, args) File "O:\src\mm\f1\work\linkdrop\lib\oauth\google_.py", line 333, in sendmessage server.sendmail(from_, to_, msg.as_string()) File "o:\src\python-2.6-svn\Lib\smtplib.py", line 709, in sendmail raise SMTPRecipientsRefused(senderrs) SMTPRecipientsRefused: {u'foo.bar': (553, "5.1.2 We weren't able to find the recipient domain. Please check for any\n5.1.2 spelling errors, and make sure you didn't enter any spaces, periods,\n5.1.2 or other punctuation after the recipient's email address. w11sm5328959wfh.6")}
Looking through the logs, many people hit this bug when they attempt to enter a person's name in the "to" address - I guess auto-complete isn't working for them and they assume f1 will match names with contacts behind the scenes?
fixed