ERPNext 7: Email not going out of support module. Email works well on other modules

The same user can send out emails from other modules, but email will not go out of “support module”.
(Well- it did work very briefly in the morning, but then emailsend broke down on “support module”.
Any help, I’d appreciate it.
Thanks!

My scheduler log is:

(535, ‘5.7.0 Mailgun is not loving your login or password’)
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py”, line 306, in send_one
smtpserver.sess.sendmail(email.sender, email.recipient, encode(email.message))
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py”, line 174, in sess
(self.password or “”).encode(‘utf-8’))
File “/usr/lib/python2.7/smtplib.py”, line 622, in login
raise SMTPAuthenticationError(code, resp)
ValidationError: (535, ‘5.7.0 Mailgun is not loving your login or password’)

Hi,
same issue here:

Scheduler log:

(535, 'Refused. Authentication failed.') Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 306, in send_one smtpserver.sess.sendmail(email.sender, email.recipient, encode(email.message)) File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 174, in sess (self.password or "").encode('utf-8')) File "/usr/lib/python2.7/smtplib.py", line 622, in login raise SMTPAuthenticationError(code, resp) ValidationError: (535, 'Refused. Authentication failed.')

Username and Passwort are ok (tested with other system)

Installed Apps
ERPNext: v7.0.26
Frappe Framework: v7.0.19
Paypal Integration: v0.0.1

12.08. UPDATE:
To be sure, problem is not me Email provider, I created a gmail address and tried.
=>Same result.

(535, '5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/answer/14257 ub8sm6198087wjc.39 - gsmtp') Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 306, in send_one smtpserver.sess.sendmail(email.sender, email.recipient, encode(email.message)) File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 174, in sess (self.password or "").encode('utf-8')) File "/usr/lib/python2.7/smtplib.py", line 622, in login raise SMTPAuthenticationError(code, resp) ValidationError: (535, '5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/answer/14257 ub8sm6198087wjc.39 - gsmtp')

Same Issue Here:

504, ‘Invalid Username or Password’)
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py”, line 306, in send_one
smtpserver.sess.sendmail(email.sender, email.recipient, encode(email.message))
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py”, line 174, in sess
(self.password or “”).encode(‘utf-8’))
File “/usr/lib/python2.7/smtplib.py”, line 622, in login
raise SMTPAuthenticationError(code, resp)
ValidationError: (504, ‘Invalid Username or Password’)

If you are using Google, be sure to check Less secure apps & your Google Account - Google Account Help

it worked before, I am using not only goole

rmehta: I receive daily and weekly digest, notifications, emails from “Purchase Order”, “Invoice” modules. But emails from “Support” do not go out. Looks like something is broken in the “support module” and it might be picking up some old/different login credentials?
The scheduler log says:
…“raise SMTPAuthenticationError(code, resp)
ValidationError: (535, ‘5.7.0 Mailgun is not loving your login or password’)”

One day (after 3 days), it started working automatically. Before we close this- any idea what must have happened? Old cache?

no, it’s still not working

There is a bug that causes the password used for SMTP authentication in the MySQL table tabEmail_account, to be overwritten with ************* (literally).

I think this is somehow causes by the Email Account form at the web interface that replaces passwords with ******** for security reasons, but then there is no proper way to prevent the actual literal ***** string to be inserted/updated into the database.

how do we resolve this issue?

$ bench update

since when did a bench update this morning on production?

Same issue here

(535, ‘5.7.8 Username and Password not accepted. Learn more at\n5.7.8 Check Gmail through other email platforms - Gmail Help c133sm965134wme.12 - gsmtp’)
Traceback (most recent call last):
File “/home/frappe/benches/bench-2016-11-03/apps/frappe/frappe/email/queue.py”, line 306, in send_one
smtpserver.sess.sendmail(email.sender, email.recipient, encode(email.message))
File “/home/frappe/benches/bench-2016-11-03/apps/frappe/frappe/email/smtp.py”, line 182, in sess
(self.password or “”).encode(‘utf-8’))
File “/usr/lib64/python2.7/smtplib.py”, line 621, in login
raise SMTPAuthenticationError(code, resp)
ValidationError: (535, ‘5.7.8 Username and Password not accepted. Learn more at\n5.7.8 Check Gmail through other email platforms - Gmail Help c133sm965134wme.12 - gsmtp’)

It was working and all of a sudden it has stopped. Its happening in production can someone help with this, its kinda URGENT

You should Google first for unblock CAPTCHA for affected account.
And also see to it that you have enabled access for l less secure apps under Google account security settings.

It is because Google blocks gmail smtp sign-in attempts from apps which do not use modern security standards (mentioned on their support page). You can however, turn on/off this safety feature by going to the link below:

Go to this link and select Turn On
https://www.google.com/settings/security/lesssecureapps

Moreover google block an ip when you try to send a email since a unusual location, so, you can unblock in the next link

and clicked in

accounts.google.com/DisplayUnlockCaptcha .