From fa58a989e8c3014e76e7550f744e9f546a979570 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Tue, 13 Dec 2022 17:17:47 +0200 Subject: [PATCH] Add welcome email --- tasks/configure_dbmail_users.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks/configure_dbmail_users.yml b/tasks/configure_dbmail_users.yml index f66cf79..1cf9fee 100644 --- a/tasks/configure_dbmail_users.yml +++ b/tasks/configure_dbmail_users.yml @@ -22,3 +22,13 @@ loop: "{{ dbmail_users }}" register: result failed_when: result.rc > 1 + +- name: Send welcome mail to users to create mailbox + community.general.mail: + subject: "This is your first email {{ item.name }} ({{ item.username }})" + to: "{{ item.username }}" + body: | + "Hello {{ item.name }}, + This is your first message for the account {{ item.username }}" + loop: "{{ dbmail_users }}" + delegate_to: localhost