Skip to content

Commit 480044b

Browse files
Addressed review comments
1 parent e16d756 commit 480044b

1 file changed

Lines changed: 39 additions & 11 deletions

File tree

content/en/docs/marketplace/platform-supported-content/modules/email-connector.md

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -263,19 +263,32 @@ Use the **SUB_SendEmail microflow** for standardized, Mendix-compliant email del
263263

264264
When working with email templates, refer to the following sample microflows:
265265

266-
* **Sample_ACT_CreateEmailFromTemplateAndThenSend** – Demonstrates creating emails from templates with additional customization
267-
* **Sample_ACT_SendEmailWithTemplate**Shows direct email sending using predefined templates
266+
* **Sample_ACT_CreateEmailFromTemplateAndThenSend** – Demonstrates how to create an email from a template, customize it, and then send it
267+
* **Sample_ACT_SendEmailWithTemplate**Demonstrates how to send an email directly using a predefined template
268268

269269
{{% alert color="info" %}}
270270
It is recommended to use **Sample_ACT_SendEmailWithTemplate** for most email template scenarios. It provides a streamlined implementation for sending templated emails with minimal configuration overhead.
271271
{{% /alert %}}
272272

273+
### Sending Email via Java Action
274+
275+
When the module is running, click New Email to compose and send new emails.
276+
277+
When modeling your app in Studio Pro, use the SendEmail Java action to send emails. The input parameters are as follows:
278+
279+
* **EmailAccount** – The entity containing the configuration details for the outgoing email account
280+
* **EmailMessage** – The entity instance containing the content and details of the email to be sent
281+
282+
The return type is a Boolean value. This Java action uses the provided details to connect to the email server and send an email. It returns True if successful and displays the error object and cause if it fails.
283+
284+
When sending an email, the To and Content fields are mandatory. In To, CC, and BCC, you can optionally specify multiple email addresses, each separated by a semicolon (;).
285+
273286
## Receive Email {#receive-email}
274287

275288
1. Deploy your application to set up your **Receive Email** accounts through the Email Connector user interface.
276-
1. Navigate to the **Email Connector Overview** page.
277-
1. Select the **Receive Email** tab.
278-
1. Click **Add New Configuration** or edit an existing one using the **Action**.
289+
2. Navigate to the **Email Connector Overview** page.
290+
3. Select the **Receive Email** tab.
291+
4. Click **Add New Configuration** or edit an existing one using the **Action**.
279292

280293
You can now set up your account for receiving email by providing the following details:
281294

@@ -376,6 +389,22 @@ You can view and change the following settings by clicking **View Settings** as
376389
* Enables security filtering to prevent cross-site scripting attacks
377390
* Removes potentially malicious scripts and content from email messages
378391

392+
### Receiving Email
393+
394+
When modeling your app in Studio Pro, use the RetrieveEmailMessages Java action. Once this Java action is called in the background, emails are fetched over multiple Java threads and returned asynchronously. Email fetching continues until the conditions defined in the email account settings are met. For example, you could set the app to fetch the latest 1,000 emails. For more information, see Additional Account Settings.
395+
396+
The input parameters for receiving email are the following:
397+
398+
* **EmailAccount** – This is an email account consisting of the incoming email configuration.
399+
400+
* **onEmailFetchMicroflow**** – This is a microflow that is triggered when List of EmailMessage is fetched from the email server, as per the batch size specified in the email account settings. You can process the list according to your needs.
401+
402+
{{% alert color="warning" %}}If duplicating the **onEmailFetchMicroflow** microflow, do not change the input parameter name or data type. To prevent errors, make sure you have **List of Email_Connector.EmailMessage** as a parameter to this microflow.{{% /alert %}}
403+
404+
* **onFetchCompleteMicroflow** – This is a microflow that is triggered when the fetch action is successfully completed.
405+
406+
* **onFetchErrorMicroflow** – This is a microflow that is triggered if there are errors while fetching from the email server.
407+
379408
#### Error Logs Tab
380409

381410
This tab displays a list of any log entries related to errors in the Email Connector module.
@@ -486,13 +515,12 @@ Admin status is given on the added API permissions. The tenant admin must regist
486515

487516
## Email Templates
488517

489-
You can create and use templates with any email account.
490-
491-
### Creating an Email Template{#create-template}
492-
493-
Use the **SNIP_EmailTemplate_Overview** snippet located in **Email_Connector** > **Private** > **Snippets**. Add the snippet directly to a page and save it.
518+
1. Deploy your application to set up your **Email Templates** through the Email Connector user interface.
519+
2. Navigate to the **Email Connector Overview** page.
520+
3. Select the **Templates** tab.
521+
4. Click **Add New Template** or edit an existing one using the **Action**.
494522

495-
{{% alert color="info" %}} The [Mx Model Reflection](/appstore/modules/model-reflection/) must be installed and properly configured in your app prior to creating placeholder tokens and before exporting/importing email templates containing placeholder tokens.{{% /alert %}}
523+
{{% alert color="info" %}} The [Mx Model Reflection](/appstore/modules/model-reflection/) must be installed and properly configured in your app prior to creating placeholder tokens and before exporting/importing email templates containing placeholder tokens.{{% /alert %}}
496524

497525
### Creating an Email Message from a Template
498526

0 commit comments

Comments
 (0)