How to send to a mailing list

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.

Email List Illustration




Related Pages
How to start and use the HowTo SMTP server in Tabulify ?

We provide a smtp: howto connection and howto service (ie a Mailpit smtp server, a local server that accepts all messages) This howto shows you how to: start an SMTP server with the smtp howto...
SMTP

smtp is a special system where you can only send an email. To send an email, you need to: create a connection and use the sendmail operation In the connection or sendmail task,...
SendMail Operation

sendMail is an intermediate operation that sends one or several emails to a SMTP server. Argument Default Description target-uri @smtp the smtp server to use to send the email (by default,...
What is the smtp Connection ?

A smtp connection is a connection to a SMTP server system. smtp is the default connection name of the sendmail operation if not specified . Attributes You can modify the following...

Task Runner