use email namespace in configuration
This is for all configuration related to sending emails, not for e.g. the default QA contact. By chance, it fixes a problem in the default configuration where the mail templates ended up in the pdc_types subtree. Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
7821f08e2e
commit
78434ffbfd
2 changed files with 22 additions and 21 deletions
|
@ -561,11 +561,11 @@ class DistgitBugzillaSync:
|
|||
|
||||
if notify_user:
|
||||
send_email(
|
||||
self.env['email_from'],
|
||||
self.env['email']['from'],
|
||||
[user_email],
|
||||
subject='Please fix your bugzilla.redhat.com account',
|
||||
message=self.env['tmpl_user_email'],
|
||||
cc_address=self.env['notify_emails'],
|
||||
message=self.env['email']['templates']['user_notification'],
|
||||
cc_address=self.env['email']['notify_admins'],
|
||||
)
|
||||
|
||||
new_data[user_email] = {
|
||||
|
@ -875,10 +875,12 @@ class DistgitBugzillaSync:
|
|||
else:
|
||||
self.notify_users(errors)
|
||||
send_email(
|
||||
self.env['email_from'],
|
||||
self.env['notify_emails'],
|
||||
self.env['email']['from'],
|
||||
self.env['email']['notify_admins'],
|
||||
'Errors while syncing bugzilla with the PackageDB',
|
||||
self.env['tmpl_admin_email'].format(errors='\n'.join(errors))
|
||||
self.env['email']['templates']['admin_notification'].format(
|
||||
errors='\n'.join(errors)
|
||||
)
|
||||
)
|
||||
else:
|
||||
with open(self.env['data_cache'], 'w') as stream:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue