Forget Password action dont check if the email is correct
(Tested in develop branch)
- Create database
- In tryton.cfg, set the [email] from and [email] uri
- Install base modules (res/ir)
- Create new user (in this case, the user will have the name "test")
- Set as email the username of the user, in this case "test"
- With the email field set, the button "Forget Password" will appear
- If we try to send the forget password, as the email don't have the correct format, returns an error.
Traceback (most recent call last):
File "/home/juanjo/Projectes/tryton_core/trytond/trytond/sendmail.py", line 47, in sendmail
senderrs = server.sendmail(from_addr, to_addrs, msg.as_string())
File "/usr/lib/python3.9/smtplib.py", line 885, in sendmail
raise SMTPRecipientsRefused(senderrs)
smtplib.SMTPRecipientsRefused: {'test': (501, b'Invalid RCPT TO address provided')
I think that if the email does not have the correct format, an UserError needs to appear to the user who clicked the "Forget Password" button, saying that the mail cannot be set.