Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
return user_email
+ @property
+ def email_to(self):
+ """
+ The name/email address of the user in MIME format
+ """
+ return email.utils.formataddr((self.name, self.email))
+
def send_email(self, *args, **kwargs):
return self.backend.messages.send_template(
*args,
+To: {{ recipient.email_to }}
Subject: {{ _("%(user)s commented on %(build)s") % { "user" : comment.user, "build" : build }}
{% for line in comment.text.splitlines() %} {{ line }}{% end %}
+To: {{ recipient.email_to }}
Subject: [{{ build }}] {{ _("Build Failed") }}
XXX TODO
+To: {{ recipient.email_to }}
Subject: [{{ build }}] {{ _("Build Finished") }}
XXX TODO
+To: {{ recipient.email_to }}
Subject: [{{ job.name }}] {{ _("Build Job Failed") }}
{{ _("The build job %s has failed") % job.name }}.