New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an email saver #4041
Add an email saver #4041
Conversation
This works now for me. Here's how I tested this on macOS: Install MailHogbrew install mailhog
brew services start mailhog
open http://127.0.0.1:8025 Setup PostfixAdd this to
Then run: sudo postfix stop
sudo postfix start |
So I think this works well, except that my local test setup with MailHog struggles with multiple emails in the same SMTP session. Libcurl does the right thing though:
I marked the part of the SMTP protocol that's legit. My hunch is that MailHog is simply not meant for this type of email testing. |
I was wrong. The actual reason was that I initially didn't terminate the email with Anyway, it's now ready to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this in an environment with a production postfix setup and it worked as expected with:
./tenzir 'version
| put version
| python "self.version = f\"Hello from Tenzir {self.version}, this email was sent via the tenzir email operator!\""
| write lines
| save email --subject "Tenzir Test" red@act.ed'
This PR adds an email saver.
Tasks
Review instructions
I tested this with this pipeline:
For the first version of theTurns out that this was easier than expected. It's now part of the PR.email
saver, I deliberately ignored MIME parts. Libcurl supports this nicely, but I'd rather get some experience with this before going more complex.An open question is how to batch events. Today, we only have the
batch
operator. In TQLv2, we'll be able to window at the event level, which is the missing piece here. I think we can ignore this problem until then.