When sending an email from mail.compose.message using a template, the system should use the outgoing mail server associated to the template. Introduce context hack to keep these values. This should NOT to be forward ported to version 8 where a proper fix exists. Fixes #3848