diff --git a/grr/server/grr_response_server/output_plugins/email_plugin.py b/grr/server/grr_response_server/output_plugins/email_plugin.py index 4091945d9..a1b9ed6a7 100644 --- a/grr/server/grr_response_server/output_plugins/email_plugin.py +++ b/grr/server/grr_response_server/output_plugins/email_plugin.py @@ -89,10 +89,15 @@ def ProcessResponse(self, response): signature=config.CONFIG["Email.signature"], hostname=utils.SmartUnicode(hostname), creator=utils.SmartUnicode(self.token.username)) - + + if config.CONFIG["Worker.smtp_mailuser"]: + email_sender = config.CONFIG["Worker.smtp_mailuser"] + else: + email_sender = "grr-noreply" + email_alerts.EMAIL_ALERTER.SendEmail( self.state.args.email_address, - "grr-noreply", + email_sender, utils.SmartStr(subject), utils.SmartStr(body), is_html=True)