In old API everything works, if I'm trying to adapt code to the new API .... failed, can anyone give me an example of working new API sendmail code please ?
After conversion, I've met some problems but finally solved, however, still no positive result, not sending messages.
@api.model
def mailmessage(self):
vals = {}
domain=[('name','ilike','Processing_order')]
tplate = self.env['email.template'].search(domain, limit = 1)
for temp in tplate:
template = temp.id
if template:
print 'Sending e-mail using template "'+temp.name+'" ..... ' # message is displayed
self.env['email.template'].send_mail(temp.id)
print '..... mail sent.' # message is displayed
return True
else:
return
but inbox .... still empty :(
No sending emails :(