Skip to content

Commit

Permalink
fix(integration): Missing secret in SMTP action
Browse files Browse the repository at this point in the history
  • Loading branch information
topher-lo committed Nov 26, 2024
1 parent 82788b3 commit 01c189c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion registry/tracecat_registry/base/core/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def _build_email_message(
namespace="core",
description="Perform a send email action using SMTP",
default_title="Send Email (SMTP)",
secrets=[smtp_secret],
)
def send_email_smtp(
sender: Annotated[str, Field(..., description="Email address of the sender")],
Expand Down Expand Up @@ -106,7 +107,10 @@ def send_email_smtp(

timeout = timeout or socket.getdefaulttimeout() or 10.0
smtp_host = secrets.get("SMTP_HOST")
smtp_port = int(secrets.get("SMTP_PORT"))
try:
smtp_port = int(secrets.get("SMTP_PORT"))
except ValueError as e:
raise ValueError(f"Expected SMTP port to be an integer. Got: {e}") from e
smtp_user = secrets.get("SMTP_USER")
smtp_pass = secrets.get("SMTP_PASS")

Expand Down

0 comments on commit 01c189c

Please sign in to comment.