Skip to content

Commit

Permalink
make {mailgun,sendgrid}_send not @staticmethod
Browse files Browse the repository at this point in the history
  • Loading branch information
wleightond committed Jul 19, 2023
1 parent cd0a409 commit 029cab3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions canarytokens/channel_output_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ def should_retry_sendgrid(success: bool, message_id: str) -> bool:
log.error("Failed to send mail via sendgrid.")
return not success

@staticmethod
@retry_on_returned_error(retry_if=should_retry_sendgrid)
def sendgrid_send(
self,
*,
api_key: SecretStr,
email_address: EmailStr,
Expand Down Expand Up @@ -298,9 +298,9 @@ def should_retry_mailgun(success: bool, message_id: str) -> bool:
log.error("Failed to send mail via mailgun.")
return not success

@staticmethod
@retry_on_returned_error(retry_if=should_retry_mailgun)
def mailgun_send(
self,
*,
email_address: EmailStr,
email_content_html: str,
Expand Down

0 comments on commit 029cab3

Please sign in to comment.