Email sending
In this path, you will learn how to build a lis of clients with the function of sending emails to them. The example shows the configuration of the group sending action (to many recipients) and the sending action to a specific addressee.
Below is the material presenting the resulting functionality.
Issues presented in the current article
DATA STRUCTURE
| LIST
|
PACKAGE
| OTHER
|
STEP 1 - DATA STRUCTURE AND LIST
In this step:
- You will create a data structure of product
- Based on the data structure You will create a list of products
- You will use a SQL query to fill data into the list
Sample script with data import:
INSERT INTO [dbo].[CLIENT] ([C\_NAME], [C\_SURNAME], [C\_EMAIL], [C\_AGE])
VALUES ('John', 'Smith', 'john.smith@home.com', 34)
INSERT INTO [dbo].[CLIENT] ([C\_NAME], [C\_SURNAME], [C\_EMAIL], [C\_AGE])
VALUES ('Adam', 'Kruger', 'adam.kruger@office.eu', 33)
INSERT INTO [dbo].[CLIENT] ([C\_NAME], [C\_SURNAME], [C\_EMAIL], [C\_AGE])
VALUES ('Danny', 'Kogh', 'danny.kogh@studio.com', 42)
INSERT INTO [dbo].[CLIENT] ([C\_NAME], [C\_SURNAME], [C\_EMAIL], [C\_AGE])
VALUES ('Ruth', 'Barber', 'ruth@barbershop.com', 35)
INSERT INTO [dbo].[CLIENT] ([C\_NAME], [C\_SURNAME], [C\_EMAIL], [C\_AGE])
VALUES ('Steven', 'Vilson', 'steven.vilson@r56.com', 63)
STEP 2 - SMTP CONFIGURATION
In this step:
- You will display the configuration parameters using the database panel
- You will complete the above parameters using an SQL script, in accordance with the configuration of the SMTP server from which you want to send e-mails.
List of SMTP configuration parameters:
common.param.smtp_ignore_certificate_errors
common.param.smtp_password
common.param.smtp_port
common.param.smtp_server
common.param.smtp_username
common.param.smtp_security
Sample configuration script:
UPDATE dbo.CONFIG_KEYS
SET CK_VALUE = 'your_value' WHERE CK_KEY = 'common.param.smtp_ignore_certificate_errors' UPDATE dbo.CONFIG_KEYS
SET CK_VALUE = 'your_value' WHERE CK_KEY = 'common.param.smtp_password' UPDATE dbo.CONFIG_KEYS
SET CK_VALUE = 'your_value' WHERE CK_KEY = 'common.param.smtp_port' UPDATE dbo.CONFIG_KEYS
SET CK_VALUE = 'your_value' WHERE CK_KEY = 'common.param.smtp_server' UPDATE dbo.CONFIG_KEYS
SET CK_VALUE = 'your_value' WHERE CK_KEY = 'common.param.smtp_username' UPDATE dbo.CONFIG_KEYS
SET CK_VALUE = 'your_value' WHERE CK_KEY = 'common.param.smtp_security'
warning
In the examples, text values are enclosed in apostrophes ('your_value'). If a configuration value needs to be cleared and set to NULL, use NULL without apostrophes. Otherwise, the text "NULL" will be saved to the database instead of the NULL value.
STEP 3 - MAILING PACKAGE
In this step:
- You will create an e-mail delivery package in two ways (collective mailing and mailing to a single recipient)
- You will use blocks (Random Data Generator, Split Way, Map In Place, Merge Way, Send Email)
- You will send a test message using the prepared package
- You modify the package and publish it (blocks: Request and Response)
STEP 4 - CALLING PACKAGE FROM LIST ACTION
In this step:
- You will create a workflow with which to invoke the e-mail sending service
- You will create two actions on the list: a collective action "send to all" and an action on the record "send to client"