Skip to content

Commit e73a9f4

Browse files
cast smtp_port to int to avoid issues
1 parent 8dd9742 commit e73a9f4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

responders/Mailer/mailer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99
from email.utils import formatdate, make_msgid
1010

1111

12-
1312
class Mailer(Responder):
1413
def __init__(self):
1514
Responder.__init__(self)
1615
self.smtp_host = self.get_param("config.smtp_host", "localhost")
17-
self.smtp_port = self.get_param("config.smtp_port", "25")
16+
self.smtp_port = int(self.get_param("config.smtp_port", "25"))
1817
self.mail_from = self.get_param(
1918
"config.from", None, "Missing sender email address"
2019
)
@@ -84,7 +83,7 @@ def run(self):
8483
# mail_to = mail_artifacts.pop()
8584
# else:
8685
# self.error("recipient address not found in observables")
87-
# Search recipient address in case tags
86+
# Search recipient address in case tags
8887
tags = self.get_param(
8988
"data.tags", None, "recipient address not found in tags"
9089
)

0 commit comments

Comments
 (0)