How to send to a mailing list
About
This howto shows you how to send multiple email with the sendmail operation.
Steps
Start the howto smtp server
Start the howto smtp server
tabul service start smtp
1 service was started
Name Type
---- ------
smtp docker
Check that you can ping it
tabul connection ping smtp
The connection (smtp) has been pinged successfully
Pipeline
In this pipeline, we define a inline data resource but you can use any data resources (a select query, a csv, …) where each column corresponds to a sendmail attributes.
kind: pipeline
spec:
steps:
- name: "Define"
comment: "This operation defines a data path with the expected columns of a mailing list"
operation: "define"
args:
data-resource:
data-def:
columns: [ "to","from","subject","txt","html" ]
data-records:
- [ "[email protected]", "[email protected]", "Email for foo", "A textual email body", "<html><body><h1>A html email body</h1></body></html>" ]
- [ "[email protected]", "[email protected]", "Email for bar", "A textual email body", "<html><body><h1>A html email body</h1></body></html>" ]
- name: "Send"
comment: "Send the email"
operation: "sendmail"
args:
target-uri: "@smtp" # smtp is the default smtp connection and is therefore optional
granularity: "record"
Execution
If you execute this pipeline
tabul flow execute pipeline/email_list.yml@howto
Output:
Execution Metrics of the pipeline (email_list)
metrics value
---------------------- -----------------------------------------------------
pipeline-path /opt/tabulify/resources/howto/pipeline/email_list.yml
processing-type batch
start-time 2025-11-10T20:01:55.194989764Z
end-time 2025-11-10T20:01:55.322621467Z
total-elapsed-time 0.128s
execution-elapsed-time 0.128s
Step execution results for the pipeline (email_list)
step_id step_name operation_name operation_type processing_type input_counter output_counter execution_counter error_counter parking_counter
------- --------- -------------- -------------- --------------- ------------- -------------- ----------------- ------------- ---------------
1 Define define Supplier batch 0 1 0 0 0
2 Send sendmail Map stream 1 1 1 0 0
Check the Inbox
In the mailpit inbox, you can then see the 2 emails.
