Closed mattdurant closed 1 month ago
@daryllimyt thoughts on making SMTP the core email action and moving resend to integrations?
Thanks for taking this on @mattdurant! This is a great idea, let's get in for the 0.4.0 release
@daryllimyt @topher-lo do you want me to refactor and move the resend piece to a new integration and out of core, or did you want to handle that?
Yes, it would be great if you could add those changes too - thanks!
@mattdurant looks like you'll have to setup pre-commit
to pass our linting checks:
cd tracecat
pip install pre-commit
pre-commit install
pre-commit run --files tracecat/actions/core/email.py
Reference: https://pre-commit.com/
@topher-lo thanks for that, finished splitting resend out into a new namespace and it passed lint checks on my side
Description
This adds support for SMTP to the core actions by implementing a core.send_email_smtp action that is not reliant on Resend for sending in on-prem or non-AWS environments.
Configuration for SMTP settings is done via environment variables, so the default docker-compose.yml file was updated to pass those to the worker container. .env.example was also updated to include placeholders for the new variables for new installs.
Related Tickets & Documents
Fixes #136
Screenshots/Recordings
No new visual content, only added to icons.tsx so that the new action has the same built-in send icon as the original send_email function
Steps to QA
Nothing special, build and deploy, use the new action in a workflow. I used a live SMTP server to test on my end.
[optional] What gif best describes this PR?