{"action":"created","issue":{"url":"https://api.github.com/repos/eleith/emailjs/issues/163","repository_url":"https://api.github.com/repos/eleith/emailjs","labels_url":"https://api.github.com/repos/eleith/emailjs/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/eleith/emailjs/issues/163/comments","events_url":"https://api.github.com/repos/eleith/emailjs/issues/163/events","html_url":"https://github.com/eleith/emailjs/issues/163","id":178258188,"number":163,"title":"sometimes getting \"authorization.failed\" errors","user":{"login":"tomgrossman","id":6324938,"avatar_url":"https://avatars.githubusercontent.com/u/6324938?v=3","gravatar_id":"","url":"https://api.github.com/users/tomgrossman","html_url":"https://github.com/tomgrossman","followers_url":"https://api.github.com/users/tomgrossman/followers","following_url":"https://api.github.com/users/tomgrossman/following{/other_user}","gists_url":"https://api.github.com/users/tomgrossman/gists{/gist_id}","starred_url":"https://api.github.com/users/tomgrossman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomgrossman/subscriptions","organizations_url":"https://api.github.com/users/tomgrossman/orgs","repos_url":"https://api.github.com/users/tomgrossman/repos","events_url":"https://api.github.com/users/tomgrossman/events{/privacy}","received_events_url":"https://api.github.com/users/tomgrossman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-21T06:28:28Z","updated_at":"2016-09-27T12:46:57Z","closed_at":null,"body":"Hi,\r\n\r\nFor the long term the package works just fine, almost no issues at all.\r\nBut every once in a while I'm getting the following error:\r\n\r\n> Unhandled rejection Error: authorization.failed\r\n    at module.exports (/root/dashboard/src/node_modules/emailjs/smtp/error.js:3:13)\r\n    at failed (/root/dashboard/src/node_modules/emailjs/smtp/smtp.js:458:28)\r\n    at response (/root/dashboard/src/node_modules/emailjs/smtp/smtp.js:463:13)\r\n    at caller (/root/dashboard/src/node_modules/emailjs/smtp/smtp.js:48:14)\r\n    at response (/root/dashboard/src/node_modules/emailjs/smtp/smtp.js:207:11)\r\n    at caller (/root/dashboard/src/node_modules/emailjs/smtp/smtp.js:48:14)\r\n    at TLSSocket.response (/root/dashboard/src/node_modules/emailjs/smtp/smtp.js:181:11)\r\n    at TLSSocket.g (events.js:260:16)\r\n    at emitTwo (events.js:87:13)\r\n    at TLSSocket.emit (events.js:172:7)\r\n    at notify (/root/dashboard/src/node_modules/emailjs/smtp/response.js:19:14)\r\n    at TLSSocket.watch (/root/dashboard/src/node_modules/emailjs/smtp/response.js:44:7)\r\n    at emitOne (events.js:77:13)\r\n    at TLSSocket.emit (events.js:169:7)\r\n    at readableAddChunk (_stream_readable.js:153:18)\r\n    at TLSSocket.Readable.push (_stream_readable.js:111:10)\r\n    at TLSWrap.onread (net.js:536:20)\r\n\r\nI'm using only one `server` object, so I know it is connected because it is sending the rest of the mails (sometimes at the same exact time as the failed mail).\r\nSo it looks like it is loosing the connection, user or password sometimes when trying to send mails.\r\n\r\nAre you aware of this issue? \r\nIs there a way I can debug it (open some debug\\trace options maybe) so I can catch the problem when it happens? It is rarely happening (once a day or two days) so I can't catch it manually on a breakpoint or something.\r\n\r\nthanks!"},"comment":{"url":"https://api.github.com/repos/eleith/emailjs/issues/comments/249854341","html_url":"https://github.com/eleith/emailjs/issues/163#issuecomment-249854341","issue_url":"https://api.github.com/repos/eleith/emailjs/issues/163","id":249854341,"user":{"login":"tomgrossman","id":6324938,"avatar_url":"https://avatars.githubusercontent.com/u/6324938?v=3","gravatar_id":"","url":"https://api.github.com/users/tomgrossman","html_url":"https://github.com/tomgrossman","followers_url":"https://api.github.com/users/tomgrossman/followers","following_url":"https://api.github.com/users/tomgrossman/following{/other_user}","gists_url":"https://api.github.com/users/tomgrossman/gists{/gist_id}","starred_url":"https://api.github.com/users/tomgrossman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomgrossman/subscriptions","organizations_url":"https://api.github.com/users/tomgrossman/orgs","repos_url":"https://api.github.com/users/tomgrossman/repos","events_url":"https://api.github.com/users/tomgrossman/events{/privacy}","received_events_url":"https://api.github.com/users/tomgrossman/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T12:46:57Z","updated_at":"2016-09-27T12:46:57Z","body":"@eleith so I reproduced the issue with debug on. It looks like you show a general error regarding authorization instead of the returned error from the SMTP server.\r\nThe error should be: `454 4.7.0 Too many login attempts, please try again later. xxxxxxxxxxxxxxx.1 - gsmtp`\r\n\r\n> Debugger listening on port 41861\r\nTue Sep 27 2016 15:40:52 GMT+0300 (IDT) Listening on port 1337\r\nconnecting: smtp-relay.gmail.com:465\r\nconnected: smtp-relay.gmail.com:465\r\n220 smtp-relay.gmail.com ESMTP xxxxxxxxxxxxxxx.1 - gsmtp\r\n\r\n> ehlo tom-intsights\r\n\r\n> 250-smtp-relay.gmail.com at your service, [5.29.193.208]\r\n250-SIZE 157286400\r\n250-8BITMIME\r\n250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH\r\n250-ENHANCEDSTATUSCODES\r\n250-PIPELINING\r\n250-CHUNKING\r\n250 SMTPUTF8\r\n\r\n> AUTH LOGIN\r\n\r\n> 334 xxxxxxxxxxxx\r\n\r\n> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n\r\n> 334 xxxxxxxxxxxx\r\n\r\n> xxxxxxxxxxxxxxxxxxxxxx==\r\n\r\n> 454 4.7.0 Too many login attempts, please try again later. xxxxxxxxxxxxxxx.1 - gsmtp\r\n\r\n> smtp connection closed.\r\nUnhandled rejection Error: authorization.failed\r\n    at module.exports (/home/tom/IntSights/dashboard/src/node_modules/emailjs/smtp/error.js:3:13)\r\n    at SMTP.login.failed (/home/tom/IntSights/dashboard/src/node_modules/emailjs/smtp/smtp.js:494:28)\r\n    at SMTP.login.response (/home/tom/IntSights/dashboard/src/node_modules/emailjs/smtp/smtp.js:499:13)\r\n    at caller (/home/tom/IntSights/dashboard/src/node_modules/emailjs/smtp/smtp.js:48:14)\r\n    at SMTP.command.response (/home/tom/IntSights/dashboard/src/node_modules/emailjs/smtp/smtp.js:207:11)\r\n    at caller (/home/tom/IntSights/dashboard/src/node_modules/emailjs/smtp/smtp.js:48:14)\r\n    at TLSSocket.SMTP.send.response (/home/tom/IntSights/dashboard/src/node_modules/emailjs/smtp/smtp.js:181:11)\r\n    at TLSSocket.g (events.js:260:16)\r\n    at emitTwo (events.js:87:13)\r\n    at TLSSocket.emit (events.js:172:7)\r\n    at notify (/home/tom/IntSights/dashboard/src/node_modules/emailjs/smtp/response.js:19:14)\r\n    at TLSSocket.watch (/home/tom/IntSights/dashboard/src/node_modules/emailjs/smtp/response.js:44:7)\r\n    at emitOne (events.js:77:13)\r\n    at TLSSocket.emit (events.js:169:7)\r\n    at readableAddChunk (_stream_readable.js:153:18)\r\n    at TLSSocket.Readable.push (_stream_readable.js:111:10)\r\n    at TLSWrap.onread (net.js:536:20)\r\n"}}
{"actor":{"display_login":"tomgrossman"}}