A common definition for email template is to use:
${(object.user_id.email and '%s <%s>' % (object.user_id.name, object.user_id.email) or '')|safe}
I am trying to use the email from the logged user, not from the object's user:
${(self.env.user.email and '%s <%s>' % (self.env.user.name, self.env.user.email) or '')|safe}
What is wrong in self.env.user.email?
You can try as following :
${(user.email and '%s <%s>' % (user.name, user.email) or '')|safe}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With