Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works on remote server, but not on local server. #103

Closed
theasder opened this issue Jul 19, 2014 · 7 comments
Closed

Works on remote server, but not on local server. #103

theasder opened this issue Jul 19, 2014 · 7 comments

Comments

@theasder
Copy link

Module works great on remote server, but on localhost it gives following error: "Error Sending: Email failed to send. Error: authorization.failed". I have no idea why, everything on local server works just fine.

@eleith
Copy link
Owner

eleith commented Jul 19, 2014

if you uncomment this line: https://github.com/eleith/emailjs/blob/master/smtp/client.js#L9

this will help provide step by step logging of what is going on in the smtp layer to help you debug the problem

@theasder
Copy link
Author

@eleith it shows:

connecting: smtp.gmail.com:465
connected: smtp.gmail.com:465
220 mx.google.com ESMTP ue3sm9312314pbc.49 - gsmtp

ehlo MacBook-Pro

250-mx.google.com at your service, [108.82.253.158]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN
250-ENHANCEDSTATUSCODES
250 CHUNKING

AUTH LOGIN

334 VXNlcm5hbWU6

eW91ckBlbWFpbC5hZGR5

334 UGFzc3dvcmQ6

Ymw0cmch

535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 ue3sm9312314pbc.49 -   gsmtp

smtp connection closed.

@eleith
Copy link
Owner

eleith commented Jul 19, 2014

what does it show when trying to connect to localhost? this was a debug log of connecting to gmail

@theasder
Copy link
Author

@eleith all in once:

[nodemon] v1.0.20
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node app.js`
body-parser deprecated bodyParser: use individual json/urlencoded middlewares app.js:43:31
body-parser deprecated urlencoded: explicitly specify "extended: true" for extended parsing node_modules/body-parser/index.js:74:29
express-session deprecated undefined resave option; provide resave option app.js:46:9
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option app.js:46:9
GET / 200 438.714 ms - -
GET /layouts/core.min.css?br34k-01 304 7.886 ms - -
GET /views/index.min.css?br34k-01 304 10.383 ms - -
GET /media/logo-symbol-64x64.png 304 11.744 ms - -
GET /media/ajax-pulse.gif 304 12.645 ms - -
GET /layouts/core.min.js?br34k-01 200 64.366 ms - -
GET /vendor/font-awesome/fonts/fontawesome-webfont.woff?v=4.0.3 200 2.110 ms - 44432    
GET /login/forgot/ 200 107.087 ms - -
GET /layouts/core.min.css?br34k-01 304 2.999 ms - -
GET /media/logo-symbol-64x64.png 304 3.452 ms - -
GET /media/ajax-pulse.gif 304 1.234 ms - -
GET /layouts/core.min.js?br34k-01 304 1.747 ms - -
GET /views/login/forgot/index.min.js?br34k-01 304 0.812 ms - -
GET /vendor/font-awesome/fonts/fontawesome-webfont.woff?v=4.0.3 304 0.694 ms - -
connecting: smtp.gmail.com:465
connected: smtp.gmail.com:465
220 mx.google.com ESMTP ue3sm9312314pbc.49 - gsmtp

ehlo MacBook-Pro

250-mx.google.com at your service, [108.82.253.158]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN
250-ENHANCEDSTATUSCODES
250 CHUNKING

AUTH LOGIN

334 VXNlcm5hbWU6

eW91ckBlbWFpbC5hZGR5

334 UGFzc3dvcmQ6

Ymw0cmch

535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 ue3sm9312314pbc.49 - gsmtp

smtp connection closed.
POST /login/forgot/ 200 1280.160 ms - 107

@eleith
Copy link
Owner

eleith commented Jul 19, 2014

this log shows you are connecting to gmail, and says that the user/pass are incorrect

535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 ue3sm9312314pbc.49 - gsmtp

@theasder
Copy link
Author

All right! Thanks.

@watadarkstar
Copy link

For me the issue was that Google no longer supports username and password only. It now requires 2FA app passwords. See here:
https://support.google.com/accounts/answer/6010255?sjid=16626078911211144448-NA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants