iehoshia
(JosĂas)
January 18, 2021, 11:33pm
1
Hi,
I am getting the follow traceback after try to send an email from a custom trigger, using 5.6 and AWS SES
Jan 18 16:42:10 localhost uwsgi[611]: 28501 140337916364544 [2021-01-18 22:42:10,932] ERROR trytond.sendmail fail to send email
Jan 18 16:42:10 localhost uwsgi[611]: Traceback (most recent call last):
Jan 18 16:42:10 localhost uwsgi[611]: File "/opt/capy/lib/python3.7/site-packages/trytond/sendmail.py", line 39, in sendmail
Jan 18 16:42:10 localhost uwsgi[611]: senderrs = server.sendmail(from_addr, to_addrs, msg.as_string())
Jan 18 16:42:10 localhost uwsgi[611]: File "/usr/lib/python3.7/smtplib.py", line 888, in sendmail
Jan 18 16:42:10 localhost uwsgi[611]: raise SMTPDataError(code, resp)
Jan 18 16:42:10 localhost uwsgi[611]: smtplib.SMTPDataError: (554, b"Transaction failed: Missing final '@domain'")
The tryton config line to email is
uri = smtp+tls://tryton@example.net:1234@smtp.example.net:587
I tried the follow command
trytond-admin --test-email <email>@gmail.com -c tr.conf -d capybaradb | grep -v INFO
And received
Success!
** Your email settings work correctly.**
Any help will be welcome!
German
(German Dario Alvarez)
January 19, 2021, 2:11am
2
I think it’s because the first @. You need to encode that symbol in uri, something like:
uri = smtp+tls://tryton%40example.net:1234 @smtp.example.net :587
iehoshia
(JosĂas)
January 19, 2021, 3:13am
3
I have made the change but without success.
pokoli
(Sergi Almacellas Abellana)
January 19, 2021, 7:06am
4
Did you set any form value on the trigger? If yes which value are you using? Did you set a domain?
As the test email is using the default from it may be the reason that email is working there but not on the trigger
1 Like
iehoshia
(JosĂas)
January 19, 2021, 4:10pm
5
I was working on Sao, for some reason I need to use Tryton an after it the trigger works fine.
I have the same config and values in form, but if I create it from Sao does not work.
ced
(CĂ©dric Krier)
January 19, 2021, 5:44pm
6
What is “it”? It is the trigger? What are the different in the table between both clients?
iehoshia
(JosĂas)
January 19, 2021, 6:04pm
7
Yes, if I create the trigger on Sao it does not work, but if I create it from Tryton it works fine. A quit strange but it works fine now.
ced
(CĂ©dric Krier)
January 19, 2021, 6:27pm
8
Please provide the difference between the two creation!
iehoshia
(JosĂas)
January 19, 2021, 6:46pm
9
Sao form
Tryton form
The only difference I noticed is that Sao in condicion field uses symbol ’ and tryton " but not sure it is related to the behavior. Even if I use ’ in sao it writes " after save.
ced
(CĂ©dric Krier)
January 19, 2021, 7:39pm
10
Please could you show the difference in the database.
iehoshia
(JosĂas)
January 19, 2021, 9:50pm
11
Hi,
After copy the trigger they are almost the same, the only difference are a spaces between them.
I’m working with 5.8 version
BTW, the trigger is working fine now.
ced
(CĂ©dric Krier)
January 19, 2021, 10:39pm
12
So there is no difference in behavior between both clients. I think your previous statement is not correct. It is not linked to the client creating the rule.
1 Like
iehoshia
(JosĂas)
January 19, 2021, 11:14pm
13
I think the same.
The trigger was created from a notification email, same information on both clients. Maybe is a different think but don’t know what, I will create both from start and try it again.
Making all the process again in tryton client works for resolve this.
German
(German Dario Alvarez)
January 20, 2021, 12:18am
14
I really think the solution for that traceback was related to @ encoding , nothing to do with the client and maybe you didn’t restart trytond at that time, so configuration was not refreshed.
1 Like