From 981df47138e96746eda5b9070b5350742fa9c700 Mon Sep 17 00:00:00 2001 From: Alexandre Magaud Date: Thu, 9 Jul 2026 16:47:40 +0200 Subject: [PATCH 1/6] feat: add Cobuild support metadata --- .../Cobuild.md | 28 +++++++++++++++++++ .../recipe.json | 3 ++ 2 files changed, 31 insertions(+) create mode 100644 custom-recipes/send-mails-from-contacts-dataset/Cobuild.md diff --git a/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md b/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md new file mode 100644 index 0000000..a92b9c4 --- /dev/null +++ b/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md @@ -0,0 +1,28 @@ +# Cobuild guidance + +Use this recipe to send one email per row of the contacts dataset. It can also include optional attachment datasets and writes send status rows to the optional output dataset. + +Roles: +- `contacts`: required input dataset. It must contain the recipient column and any columns used by sender, subject, body templates, or Jinja variables. +- `attachments`: optional input datasets. Use when the email body or attachment files need data from extra datasets. +- `output`: optional output dataset for send status. Create or select it when the user wants delivery status persisted. + +Core configuration: +- Set `recipient_column` to the email-recipient column from `contacts`. +- For the sender, either set `sender_column`, or set `use_sender_value=true` and `sender_value`, unless the selected mail channel already defines the sender. +- For the subject, either set `subject_column`, or set `use_subject_value=true` and `subject_value`. +- For the body, either set `body_column`, or set `use_body_value=true` and use `body_format` with `body_value` for plain text or `html_body_value` for HTML. +- `body_value` and `html_body_value` support Jinja templating over columns from the contacts dataset and attached datasets. +- Set `attachment_type` to `send_no_attachments`, `excel`, or `csv`. + +Mail channel handling: +- `mail_channel` is a dynamic choice. Use `list_message_channels` with `integrationType=mail` to discover mail channels. +- If using a listed channel, set `mail_channel` to the channel id. +- If the channel has a configured sender or uses the current user as sender, append `__WITH_DEFINED_SENDER__` to the channel id. +- If using direct SMTP, set `mail_channel` to `__DKU__DIRECT_SMTP__` when channels exist, or leave it null when direct SMTP is the only option. + +Direct SMTP configuration: +- When `mail_channel` is null or `__DKU__DIRECT_SMTP__`, set `smtp_host` and `smtp_port`. +- Set `smtp_use_tls` when TLS is required. +- If SMTP authentication is required, set `smtp_use_auth=true` and `smtp_user`. +- Do not ask the user to paste `smtp_pass` in chat. Create the recipe, navigate to the recipe settings, and ask the user to fill the password there. diff --git a/custom-recipes/send-mails-from-contacts-dataset/recipe.json b/custom-recipes/send-mails-from-contacts-dataset/recipe.json index e656acd..97a48b4 100644 --- a/custom-recipes/send-mails-from-contacts-dataset/recipe.json +++ b/custom-recipes/send-mails-from-contacts-dataset/recipe.json @@ -4,6 +4,9 @@ "description" : "Send personalised emails for every row in a Contacts dataset (mandatory), with data from Attachments datasets (optional) as CSV or Excel attachments, and use JINJA templating to show data in the email body. The output dataset shows the status of sent emails - please review it even if the job succeeds." }, "kind" : "PYTHON", + "cobuild": { + "supported": true + }, "selectableFromDataset": "contacts", "paramsPythonSetup": "dynamic_form.py", "inputRoles" : [ From 3d5942143466479a4795587bfd03bc6766f73b2a Mon Sep 17 00:00:00 2001 From: Alexandre Magaud Date: Tue, 21 Jul 2026 15:05:24 +0200 Subject: [PATCH 2/6] chore: streamline Cobuild guidance --- .../Cobuild.md | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md b/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md index a92b9c4..3320ed4 100644 --- a/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md +++ b/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md @@ -1,28 +1,18 @@ # Cobuild guidance -Use this recipe to send one email per row of the contacts dataset. It can also include optional attachment datasets and writes send status rows to the optional output dataset. +Role-specific behavior: +- `contacts` supplies recipients and the columns available to sender, subject, body, and Jinja templates. +- `attachments` supplies additional datasets used in templates or generated attachments. +- `output`, when configured, persists delivery-status rows that should be reviewed even when the recipe run succeeds. -Roles: -- `contacts`: required input dataset. It must contain the recipient column and any columns used by sender, subject, body templates, or Jinja variables. -- `attachments`: optional input datasets. Use when the email body or attachment files need data from extra datasets. -- `output`: optional output dataset for send status. Create or select it when the user wants delivery status persisted. - -Core configuration: -- Set `recipient_column` to the email-recipient column from `contacts`. +Message configuration: - For the sender, either set `sender_column`, or set `use_sender_value=true` and `sender_value`, unless the selected mail channel already defines the sender. - For the subject, either set `subject_column`, or set `use_subject_value=true` and `subject_value`. - For the body, either set `body_column`, or set `use_body_value=true` and use `body_format` with `body_value` for plain text or `html_body_value` for HTML. - `body_value` and `html_body_value` support Jinja templating over columns from the contacts dataset and attached datasets. -- Set `attachment_type` to `send_no_attachments`, `excel`, or `csv`. Mail channel handling: - `mail_channel` is a dynamic choice. Use `list_message_channels` with `integrationType=mail` to discover mail channels. - If using a listed channel, set `mail_channel` to the channel id. - If the channel has a configured sender or uses the current user as sender, append `__WITH_DEFINED_SENDER__` to the channel id. - If using direct SMTP, set `mail_channel` to `__DKU__DIRECT_SMTP__` when channels exist, or leave it null when direct SMTP is the only option. - -Direct SMTP configuration: -- When `mail_channel` is null or `__DKU__DIRECT_SMTP__`, set `smtp_host` and `smtp_port`. -- Set `smtp_use_tls` when TLS is required. -- If SMTP authentication is required, set `smtp_use_auth=true` and `smtp_user`. -- Do not ask the user to paste `smtp_pass` in chat. Create the recipe, navigate to the recipe settings, and ask the user to fill the password there. From 68f19d56315ed736a97a7c2599906b1b76bbc103 Mon Sep 17 00:00:00 2001 From: Alexandre Magaud Date: Mon, 3 Aug 2026 15:46:26 +0200 Subject: [PATCH 3/6] fix: require Send Mail runtime inputs --- custom-recipes/send-mails-from-contacts-dataset/recipe.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom-recipes/send-mails-from-contacts-dataset/recipe.json b/custom-recipes/send-mails-from-contacts-dataset/recipe.json index 97a48b4..ec249c0 100644 --- a/custom-recipes/send-mails-from-contacts-dataset/recipe.json +++ b/custom-recipes/send-mails-from-contacts-dataset/recipe.json @@ -26,7 +26,7 @@ { "name": "output", "arity": "UNARY", - "required": false, + "required": true, "acceptsDataset": true } ], @@ -79,12 +79,14 @@ "name": "smtp_user", "label" : "SMTP Username", "type": "STRING", + "mandatory": true, "visibilityCondition" : "(model.mail_channel == null || model.mail_channel == '__DKU__DIRECT_SMTP__') && model.smtp_use_auth" }, { "name": "smtp_pass", "label" : "SMTP Password", "type": "PASSWORD", + "mandatory": true, "visibilityCondition" : "(model.mail_channel == null || model.mail_channel == '__DKU__DIRECT_SMTP__') && model.smtp_use_auth" }, From 0aea9da52ed916c6b6cac19217b7a0d259d80dda Mon Sep 17 00:00:00 2001 From: Alexandre Magaud Date: Mon, 3 Aug 2026 16:23:34 +0200 Subject: [PATCH 4/6] chore: refine Send Mail Cobuild guidance --- .../send-mails-from-contacts-dataset/Cobuild.md | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md b/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md index 3320ed4..b7b1903 100644 --- a/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md +++ b/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md @@ -1,18 +1,8 @@ # Cobuild guidance -Role-specific behavior: -- `contacts` supplies recipients and the columns available to sender, subject, body, and Jinja templates. -- `attachments` supplies additional datasets used in templates or generated attachments. -- `output`, when configured, persists delivery-status rows that should be reviewed even when the recipe run succeeds. - -Message configuration: - For the sender, either set `sender_column`, or set `use_sender_value=true` and `sender_value`, unless the selected mail channel already defines the sender. - For the subject, either set `subject_column`, or set `use_subject_value=true` and `subject_value`. - For the body, either set `body_column`, or set `use_body_value=true` and use `body_format` with `body_value` for plain text or `html_body_value` for HTML. -- `body_value` and `html_body_value` support Jinja templating over columns from the contacts dataset and attached datasets. - -Mail channel handling: -- `mail_channel` is a dynamic choice. Use `list_message_channels` with `integrationType=mail` to discover mail channels. -- If using a listed channel, set `mail_channel` to the channel id. -- If the channel has a configured sender or uses the current user as sender, append `__WITH_DEFINED_SENDER__` to the channel id. -- If using direct SMTP, set `mail_channel` to `__DKU__DIRECT_SMTP__` when channels exist, or leave it null when direct SMTP is the only option. +- For `mail_channel`, call the `list_message_channels` tool with `integrationType=mail`. If several channels are available and the user did not identify one, ask which one to use. +- Set `mail_channel` to the chosen channel id. Append `__WITH_DEFINED_SENDER__` when its `sender` is set or `useCurrentUserAsSender` is true. +- If the user chooses to configure SMTP directly instead of using a DSS mail channel, set `mail_channel` to `__DKU__DIRECT_SMTP__`. When no DSS mail channel exists, leave it null. From e8fe9da3795e9a2a51b67c3f7eb9e8c097ee70a9 Mon Sep 17 00:00:00 2001 From: Alexandre Magaud Date: Tue, 4 Aug 2026 10:48:27 +0200 Subject: [PATCH 5/6] chore: document Send Mail runtime requirements --- custom-recipes/send-mails-from-contacts-dataset/Cobuild.md | 4 ++-- custom-recipes/send-mails-from-contacts-dataset/recipe.json | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md b/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md index b7b1903..1cf9261 100644 --- a/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md +++ b/custom-recipes/send-mails-from-contacts-dataset/Cobuild.md @@ -1,8 +1,8 @@ -# Cobuild guidance - +- Always configure `output` with an existing dataset; the runner requires it even though the descriptor marks the role optional. - For the sender, either set `sender_column`, or set `use_sender_value=true` and `sender_value`, unless the selected mail channel already defines the sender. - For the subject, either set `subject_column`, or set `use_subject_value=true` and `subject_value`. - For the body, either set `body_column`, or set `use_body_value=true` and use `body_format` with `body_value` for plain text or `html_body_value` for HTML. - For `mail_channel`, call the `list_message_channels` tool with `integrationType=mail`. If several channels are available and the user did not identify one, ask which one to use. - Set `mail_channel` to the chosen channel id. Append `__WITH_DEFINED_SENDER__` when its `sender` is set or `useCurrentUserAsSender` is true. - If the user chooses to configure SMTP directly instead of using a DSS mail channel, set `mail_channel` to `__DKU__DIRECT_SMTP__`. When no DSS mail channel exists, leave it null. +- When direct SMTP uses authentication (`smtp_use_auth=true`), set `smtp_user` and ask the user to set `smtp_pass` in the DSS recipe settings; both are required by SMTP login. diff --git a/custom-recipes/send-mails-from-contacts-dataset/recipe.json b/custom-recipes/send-mails-from-contacts-dataset/recipe.json index ec249c0..97a48b4 100644 --- a/custom-recipes/send-mails-from-contacts-dataset/recipe.json +++ b/custom-recipes/send-mails-from-contacts-dataset/recipe.json @@ -26,7 +26,7 @@ { "name": "output", "arity": "UNARY", - "required": true, + "required": false, "acceptsDataset": true } ], @@ -79,14 +79,12 @@ "name": "smtp_user", "label" : "SMTP Username", "type": "STRING", - "mandatory": true, "visibilityCondition" : "(model.mail_channel == null || model.mail_channel == '__DKU__DIRECT_SMTP__') && model.smtp_use_auth" }, { "name": "smtp_pass", "label" : "SMTP Password", "type": "PASSWORD", - "mandatory": true, "visibilityCondition" : "(model.mail_channel == null || model.mail_channel == '__DKU__DIRECT_SMTP__') && model.smtp_use_auth" }, From a238d081df446375fec8e26472de513b1ed72b8c Mon Sep 17 00:00:00 2001 From: Alexandre Magaud Date: Mon, 10 Aug 2026 11:40:15 +0200 Subject: [PATCH 6/6] chore: bump version to 1.1.0 --- CHANGELOG.md | 2 ++ plugin.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9379d7..10ecf4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## [Version 1.1.0](https://github.com/dataiku/dss-plugin-sendmail/releases/tag/v1.1.0) - Feature release - 2026-08 +- Add Cobuild support to the send mails recipe ## [Version 1.0.3](https://github.com/dataiku/dss-plugin-sendmail/releases/tag/v1.0.3) - Feature release - 2025-03 diff --git a/plugin.json b/plugin.json index ee7b2ac..8f000c5 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "id": "sendmail", - "version": "1.0.3", + "version": "1.1.0", "meta": { "label": "Send emails", "description": "Send emails based on a dataset containing a list of contacts, with optional attachments (other datasets)",