honor configuration when sending emails

- Move the send_email() function into DistgitBugzillaSync as a method in
  order to access the configuration environment easily.
- Make whether or not emails are sent use the email.send_mails
  configuration option rather than the name of the configuration
  environment.
- Don't hard code the SMTP host.

Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
Nils Philippsen 2019-11-22 16:57:43 +01:00
parent 2b7712f826
commit 12b90b22dd
2 changed files with 23 additions and 24 deletions

View file

@ -30,6 +30,7 @@ Reassigning to the new maintainer of this component.
[email]
send_mails = false
smtp_host = "bastion"
from = "accounts@fedoraproject.org"
notify_admins = [
"root@localhost.localdomain",