diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py index 11b182fba25..60b3b0d3af0 100644 --- a/addons/email_template/wizard/mail_compose_message.py +++ b/addons/email_template/wizard/mail_compose_message.py @@ -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 = [] diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py index 9111e8a8f92..4dd48c2abe0 100644 --- a/addons/mail/mail_followers.py +++ b/addons/mail/mail_followers.py @@ -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,