Skip to Content
Menu
This question has been flagged
1795 Views

i am using...

def create_email(self,user,i,model1):  // i is a current record ids[0]

        alrt_mail = [] 

        for u in user.alrt_users_ids: //alrt_users_ids is a One2many field
            alrt_mail.append(u.res_usr_id.login)

alrt_mail have all the recipient partners

    template_obj = self.env['email.template']

    template_obj.send_mail(user.template_id, i, force_send=True)

but how to set from and recipient partner email id.

Avatar
Discard