Successfully!

Error!

Task Schedule Email Notification

  • Last update:  2024-04-17
  • Overview

    Version

    Report Server Version
    Functional Change

    11.0

    /

    11.0.4

    • Supported formulas for Recipient under Task Schedule > File Processing > Email Notification.

    • Supported formulas for CC under Task Schedule > File Processing > Email Notification.

    • Supported formulas for BCC under Task Schedule > File Processing > Email Notification.

    V11.0.5

    If Recipient in Email Notification is empty, a prompt displaying "The email recipient cannot be empty." will pop up when you save the task and the setting will fail to be saved.

    V11.0.25

    If you select Text Plus Result Link in Email Notification of the FRM/FVS scheduled task, the to-be-sent content will not change and still be the report result when the scheduled task is triggered.

    Application Scenario

    • You can send notifications and reminders in batches to users during front-end data entry through Email Notification.

    • You can send emails to different users at fixed intervals after the corresponding condition is met and the scheduled task is triggered.

    Function Description

    You can set the sender and recipient, send reminders through emails after the scheduled task is completed, and send emails to inform the recipient of the result.

    This document demonstrates how to use the Email Notification function in Task Schedule through section "Example."

    This document explains the Email Notification function in detail through section "Function Detail."

    Example

    Schedule a task to send the latest sales details through emails to the sales leader at 18:00 every evening.

    Setting the Sender

    You must set a sender for the email, otherwise the email cannot be successfully sent.

    Log in to the decision-making platform as the admin, choose System Management > System Setting > Mailbox, add the sender address, and click OK, as shown in the following figure.

    iconNote:

    1. The configuration steps may vary in different types of sender addresses. For details, see Email Service.

    2. After configuration, click Send Test Mail to ensure that the address is available.

     1.png

    Setting the Recipient

    To send emails to the sales director Alice, first bind a mailbox for her.

    Log in to the decision-making platform as the admin, choose System Management > User Management > All Users, click the xxx icon behind Alice (the sales leader), enter the email address, and click OK, as shown in the following figure.

    iconNote:
    This example only demonstrates how to configure the mailbox for users in FineBI. The admin can also configure mailboxes when synchronizing or manually adding users. For details, see User Adding, Importing Users, and Synchronizing Users.

     2.png

    Adding the Task

    Log in to the decision-making system as the admin, choose System Management > Task Schedule > Task Management, and click Add Task to add a scheduled task, as shown in the following figure.

     3.png

    Basic Setting

    1. Set Task Name to Daily Sales Report.

    2. Click Edit next to Default User Group, select Sales Leader from the drop-down list of Dept., and click OK, as shown in the following figure.

    iconNote:
    You can also unset Default User Group. In this case, you can set a specified mailbox in Recipient, but cannot associate the mailbox with the user on the decision-making platform.

     4.png

    Confirm that you have selected Sales Leader in Dept. and click OK to finish the setting. Click Next, as shown in the following figure.

     5.png

    Schedule Object

    1. Set Object Type to Report Template and select GettingStartedEN.cpt from the drop-down list of Select Template.

    2. Set File Name to Sales Performance of ${now()}.

    3. Set Accessory Archive to pdf.

    Click Next, as shown in the following figure.

    iconNote:
    The available type of the email attachment during email sending is consistent with the type you have selected in Accessory Archive.

     6.png

    Schedule Cycle

    Set Frequency to Detailed Frequency Setting and click Add.

    Set Execution Time to 18 Hour 0 Minute, Execution Date to Daily, and Month to Select All and click OK to successfully add the detail frequency.

    Select the added detail frequency and click Next, as shown in the following figure.

     7.png

    File Processing

    1. Set Processing Method to Email Notification.

    2. Set each setting item in Email Notification as follows.

    • Set Sender to the default sender of the system. You can also select other senders from the drop-down list.

    • Set Recipient to Default User Group.

    • Set Theme to Sales Performance of ${today()}.

    • Set Mail Content to Please check today's sales performance.

    • Select Text Preview Report Content.

    • Select Text Plus Result Link.

    • Select Use Attachments.

    Click Save, as shown in the following figure.

     8.png

    Effect Display

    Since the task is executed at 18:00 every evening, the task effect cannot be seen immediately.

    To see the effect immediately, choose System Management > Task Schedule > Task Management, locate the task, and click the Run Once icon.

     9.png

    After the task is executed once, Alice (the sales leader) receives an email from the decision-making platform in her bound mailbox.

    The following figure shows the email content.

     10.png

    Function Detail

    You can set Processing Method under Task Schedule > File Process to Email Notification, as shown in the following figure.

    This section introduces the Email Notification function in detail and some aspects you need to note.

     

    Sender

    You must set a sender for the email, otherwise the email cannot be successfully sent.

    Log in to the decision-making platform as the admin, choose System Management > System Setting > Mailbox, click Add Sender, configure the sender account, and click OK, as shown in the following figure.

    The system default sender is selected by default during scheduled task setting. You can also select other senders from the drop-down list.

    iconNote:

    1. The configuration steps may vary in different types of sender addresses. For details, see Email Service.

    2. After configuration, click Send Test Mail to ensure that the address is available.

     11.png

    Recipient

    You can set Recipient to Default User Group or a custom mailbox.

    iconNote:
    You are not advised to use the Outlook mailbox as the recipient address, because many problems relating to style incompatibility may be caused.

    1. Default User Group

    Default User Group in Email Notification is consistent with that set under Task Schedule > Basic Setting. Users in the decision-making platform will receive emails from scheduled tasks if you set Recipient to Default User Group.

     12.png

    If you do not bind mailboxes for users in Default User Group, the email cannot be successfully sent.

     13.png

    2. Custom Mailbox

    You can manually enter multiple mailboxes (no need to be bound to users in the decision-making platform) separated by the comma ,, for example, Alice@gmail.com,James@gmail.com.

    iconNote:

    1. Report projects starting from FineReport 11.0.4 allow you to enter mailboxes through formulas.

    2. If the character length of manually entered mailboxes is more than 1000 (such as 111@gmail.com,222@gmail.com,333@gmail.com...nnn@gmail.com), the task cannot be saved. A prompt displaying "Task Update Failed" pops up.

    The character length of the parsed mailboxes (such as mailboxes formed through formula entering) is not limited by FineReport. The task can be saved. However, the task may fail to be executed because of environment factors, for example,  limitations on the mailbox server.

     14.png

    CC/BCC

    You can set the recipients of CC and BCC to platform users or custom mailboxes.

    1. Platform User

    You can set the recipients of CC and BCC to platform users. In this case, users on the decision-making platform will receive emails from scheduled tasks.

    • You must bind mailboxes for platform users that can be selected.

    • Platform users who are not bound to their mailboxes will not appear in the drop-down list.

    • The recipients' mailboxes for CC and BCC are displayed one by one based on the order you select them.

     15.png

    2. Custom Mailbox

    You can manually enter multiple mailboxes (no need to be bound to users in the decision-making platform) separated by the comma ,, for example, Alice@gmail.com,James@gmail.com.

    iconNote:

    1. Report projects starting from FineReport 11.0.4 allow you to enter mailboxes through formulas.

    2. If the character length of manually entered mailboxes is more than 1000 (such as 111@gmail.com,222@gmail.com,333@gmail.com...nnn@gmail.com), the task cannot be saved. A prompt displaying "Task Update Failed" pops up.

    The character length of the parsed mailboxes (such as mailboxes formed through formula entering) is not limited by FineReport. The task can be saved. However, the task may fail to be executed because of environment factors, for example,  limitations on the mailbox server.

     16.png

    Theme

    Theme is the title of the email and must be set.

    1. You can manually enter common texts in Theme.

    2. You can also set Theme through formulas.

    Mail Content

    Mail Content is the body of the email and is optional.

    1. Supporting Texts

    You can manually enter common texts in Mail Content.

    2. Supporting Formulas

    You can set Mail Content through formulas.

    3. Supporting HTML Tags

    You can use HTML tags in Mail Content, as shown in the following figure.

     17.png

    The supported HTML tags include a, abbr, b, br, button, dd, dl, dt, form, hr, i, img, input, li, ol, p, span, sub, sup, table, td, tr, and ul.

    You are advised to observe the following tips when using HTML tags.

    • Most email clients do not support the body tag. If other tags are not parsed because of the absence of the body tag, you can try to add the body tag.

    • Try to use the table tag (rather than the div tag) in the webpage layout.

    • The img tag is the only external resource referenced by the client. However, many clients (such as Gmail) do not display images by default. Therefore, you need to ensure that the main content can be read even without images. At the same time, you need to ensure that the borders of the image link added by some clients are removed.

    <img border="0" style="display:block;">

         You are advised to define clear height and width for all images.

    • You need to use inline styles (not the shorthand form) in all CSS rules.

    • When the email content is displayed in HTML format, some fonts are not supported for display.

    • The unsupported fonts (that are displayed as SimSun font) are those that contains special symbols such as spaces and - in the font name. For example, Windding 3 is not supported.

    Text Previewing Report Content

    If you select Text Preview Report Content, the report content will be displayed in the email body.

    Tables in the email are displayed in HTML format. Charts in the email are displayed in image format.

    Text Plus the Result Link

    If you select Text Plus Result Link, the report link will be added to the email body. The link content will not be changed and will be consistent with the content when the scheduled task is triggered.

    You need to enter the username and password of the decision-making platform to view the result report.

    Use Attachment

    If you do not select other attachment formats under Schedule Object > Accessory Archive, except Result Report, the Use Attachments function in Email Notification will be grayed out. No attachment files will exist in the email.

    If you select other attachment formats under Schedule Object > Accessory Archive, except Result Report, you can set Use Attachments in Email Notification. The available type of the email attachment during email sending is consistent with the type you have selected in Accessory Archive.

    iconNote:
    The result report files in .cpr or .frr format will not be sent as attachments in the email.

     18.png

    Received Email

    The following figure shows the corresponding relationship between the received email and settings.

     19.png

    19.1.png

    Notes

    You need to pay attention to the following aspects regarding Text Preview Report Content and Use Attachments.

    • Text Preview Report Content is displayed based on the generated result report. That is, Text Preview Report Content is displayed based on the template parameters corresponding to different users.

    • If a recipient has the corresponding result report, the result report will be separately sent to this recipient.

    • If some recipients do not have the corresponding result reports, general result reports will be sent to these recipients together.

    • If some recipients do not have corresponding result reports or general result reports, the sending will fail.

    • Users receive the result report and attachment every time when the scheduled task is executed.

    • If a user has multiple result reports in one task, multiple bodies and attachments will also be sent. The attachment name will be concatenated with the template parameters during being renamed.

    If multiple emails need to be sent by a scheduled task and some of the emails cannot be sent successfully, the task will first send the emails that can be sent.

    Admins can view a list of users who fail to receive the email under Task Schedule > Running Surveillance > Task Execution Detail, as shown in the following figure. 

    20.png

    Attachment List


    Theme: Decision-making Platform
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback