-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Hi everybody,
it's more a question not an issue. Please, tell me how to configure mail notifications in django-pyas2 if messege's STATUS is changed to ERROR. I've already tried to set EMAIL_HOST, etc. in my settings.py, but it doesn't work in this version. I found that in pyas2 was a bit of code which done this job, but here I'm afraid it disappeared.
Below the code from pyas2 about an email (maybe I'm wrong...)
# Build and send the AS2 message
try:
payload = as2lib.build_message(message)
as2lib.send_message(message, payload)
except Exception:
message.status = 'E'
txt = traceback.format_exc(None).decode('utf-8', 'ignore')
message.adv_status = \
_(u'Failed to send message, error:\n%(txt)s') % {'txt': txt}
pyas2init.logger.error(message.adv_status)
models.Log.objects.create(
message=message, status='E', text=message.adv_status)
message.save()
# Send mail here
as2utils.senderrorreport(message, message.adv_status)
sys.exit(2)
Metadata
Metadata
Assignees
Labels
No labels