[FIX] mail: get template outgoing server
The outgoing server of a mail template is not used when sending a mail. This fix propagates the mail server the same way it's done for auto_delete. opw-633005
This commit is contained in:
parent
571ccec154
commit
eb463689c0
|
@ -74,6 +74,7 @@ class mail_compose_message(osv.TransientModel):
|
|||
if wizard.template_id:
|
||||
wizard_context['mail_notify_user_signature'] = False # template user_signature is added when generating body_html
|
||||
wizard_context['mail_auto_delete'] = wizard.template_id.auto_delete # mass mailing: use template auto_delete value -> note, for emails mass mailing only
|
||||
wizard_context['mail_server_id'] = wizard.template_id.mail_server_id.id
|
||||
if not wizard.attachment_ids or wizard.composition_mode == 'mass_mail' or not wizard.template_id:
|
||||
continue
|
||||
new_attachment_ids = []
|
||||
|
|
|
@ -214,6 +214,7 @@ class mail_notification(osv.Model):
|
|||
mail_values = {
|
||||
'mail_message_id': message.id,
|
||||
'auto_delete': (context or {}).get('mail_auto_delete', True),
|
||||
'mail_server_id': (context or {}).get('mail_server_id', False),
|
||||
'body_html': body_html,
|
||||
'recipient_ids': [(4, id) for id in chunk],
|
||||
'references': references,
|
||||
|
|
Loading…
Reference in New Issue