You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/marketplace/platform-supported-content/modules/email-connector.md
+39-11Lines changed: 39 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -263,19 +263,32 @@ Use the **SUB_SendEmail microflow** for standardized, Mendix-compliant email del
263
263
264
264
When working with email templates, refer to the following sample microflows:
265
265
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
268
268
269
269
{{% alert color="info" %}}
270
270
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.
271
271
{{% /alert %}}
272
272
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
+
273
286
## Receive Email {#receive-email}
274
287
275
288
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**.
279
292
280
293
You can now set up your account for receiving email by providing the following details:
281
294
@@ -376,6 +389,22 @@ You can view and change the following settings by clicking **View Settings** as
376
389
* Enables security filtering to prevent cross-site scripting attacks
377
390
* Removes potentially malicious scripts and content from email messages
378
391
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
+
379
408
#### Error Logs Tab
380
409
381
410
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
486
515
487
516
## Email Templates
488
517
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**.
494
522
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 %}}
0 commit comments