...
The data that will be used to create the email body and indicate the list of recipients needs to be added to the intermediate object of a pipeline.
Properties
Property | Description | Default | Type | Required |
---|
type | Stage class name | - | string | Yes |
enable | Enable stage for execution | true | boolean | No |
name | Name for this specific stage | string | No |
|
save_to_intermediate | If true, the result of the stage will be stored in the intermediate instead of the final section | false | boolean | No |
data_preparation_stage_name | Indicates the name of the stage that contains and prepares the data to be sent via email. | - | string |
NoExample Configuration
Code Block |
---|
|
_send_mail = SendEmailStage(
data_preparation_stage_name="prep_stage",
enable=True,
name='send_mail_stage',
) |
...
The data that will be used to send an email needs to be on the intermediate object and must have these properties:
Property | Description | Default | Type | Required |
---|
from_email | Email that will be used as a source of all the emails sent. | - | string | Yes |
to_email | List of all the email addresses that will be recipients of the emails sent. | - | list | Yes |
subject | Subject of the email sent. | string | String |
|
data_url | (Optional) Comes from the default template. A value that will be replaced on the template. | - | string | No |
username | (Optional) Comes from the default template. A value that will be replaced on the template. | - | string | No |
Example of Data needed to send emails (Intermediate object)
Code Block |
---|
|
data={
"from_email": "[email protected]",
"to_email": ["[email protected]", "[email protected]"],
"subject": "This is a test",
"data_url": "http://example.com/",
"username": "This is an example"
} |
Note |
---|
IMPORTANT!
If you plan to use gmail as the email sender you need to follow these steps first! |