CHG dont add email event on send failure
@@ -54,11 +54,12 @@ def send_email_event(
# Send email
try:
- send_message(service, message)
+ success = send_message(service, message) is not False
except Error as e:
logger.error(f'Failed to send email!\nerror={e}\n\n{traceback.format_exc()}\nemail={message}')
return
+ if success:
event: EmailEvent = EmailEvent(
owner_id=user.id,
template_id=template_key,
