Support > Repository > Sending and receiving e-mail > Send e-mail (time specified by job)
ja | en

You can send mail by time designation for data that meets certain conditions.

Before reading this page,Send mail (fix mail template)Please look through.

Open the "Mail> Send (Job)" tab of the model.You can set multiple jobs related to sending mail. The setting of one job is one "mail templateI will link it.

Figure 1 Definition of mail sending job
item Description Input example
Job name For this application system as a whole, specify a non-overlapping job name (English).In the case of sending e-mails, it is better to use "SendMail" + (model name) + "Job". SendMailLeaveJob
Description Please write freely. -
Start condition Specify conditions to send e-mails.If this field is empty, send mail to all data.Items concerning the target model are expressed as "$ {" + (item name) + "}".functionYou can also use.
Action on success Specify processing to be performed after mail transmission succeeds.Items concerning the target model are expressed as "$ {" + (item name) + "}".functionYou can also use.You can also specify an assignment statement using "=".
Action on failure Specify conditions to be performed after mail transmission fails.Items concerning the target model are expressed as "$ {" + (item name) + "}".functionYou can also use.You can also specify an assignment statement using "=".
Mail Template Item It becomes the identifier (ID) of "mail template" to be described later.Please choose a unique name with a combination of alphanumeric characters.If this value is blank, "job name" is used as the mail template ID. SendMailLeaveJobTemplate
Mail transmission control Maximum number of simultaneous transmissions Limit the number of e-mails sent at once to reduce the load on the mail server. If the number of transmissions exceeds the specified number, processing will be interrupted for the time specified in "Waiting time" and transmission processing will resume. If there is no input it will be unlimited. If you send a large amount of mail at once, it may be judged that the mail server is spam mail (junk mail).Please adjust the appropriate value. 10
Wait time (sec) If the number of transmissions exceeds the specified maximum number of simultaneous transmissions, the transmission process will resume after suspending processing for the specified time. If there is no input, it will be 0 seconds. If you send e-mail continuously, the mail server may judge it as spam mail (junk mail).Please set an appropriate waiting time. 30

Log on as a system administrator to the application you built.Make detailed settings for the mail template set in Fig. 1.Register new mail templates.(FIGS. 2 and 3)

Figure 2 To register new mail template
Fig. 3 New registration of mail template

For details on how to set the mail template,Definition method> Setting of mail templatePlease read.

The "ID" should be the same as the one described in "Mail Template Item" in Figure 1.(If "mail template item" is blank in Fig. 1, please set it to the value set by "job name".)

Job dedicated account jobadmin setting

"Support> Administrator Guide>Preparation: Enable job execution accountFollow the instructions in "Activate jobadmin account".

It is necessary to give the jobadmin account the operation authority (principal) of the target model for sending mail.In the example shown in Fig. 4, it is an example of granting "general user" principal.

Figure 4 jobadmin account settings

Schedule setting

We will register a new job schedule.

  1. Log on with an account with administrator privileges.
  2. Open the "Job Management" "Job Schedule Search" screen from the menu.
  3. Click the "Register Screen" button to register a new job schedule.
  4. From the job name, select the job name set in Figure 1.(Fig. 5) * If you can not select a job name, please read the notes in the lower column of Fig.
  5. Specify scheduleTo do.
  6. Check the "valid" flag.
  7. Enter the account "jobadmin" to run this job.
  8. Register the job schedule.The command will be executed at the specified time.
Fig. 5 New registration of schedule

When job name can not be selected

If you can not select the job name in step 4 above, you may have imported all the old data after the build.The added job is prepared as a "job master" model, and the export data is described in the "data_init" folder after the build, but it does not exist in the old data.Therefore, the job information is old data at the timing when the old data is imported.

As a countermeasure, after importing the old data, import the "data_init" folder to the import folder name again and import "model list provided by the system> job master" again.This will make it possible to recognize (added) jobs.

You can temporarily disable the job.

  1. Log on with an account with administrator privileges.
  2. Open the "Job" "Job Schedule Search" screen from the menu.
  3. Search the applicable "Job Schedule" and open the maintenance screen.
  4. Uncheck the "Enabled" flag and save it.
Figure 2 Disable Job

You can send the job execution result by e-mail.(Since we already use "mail template" with mail sending function, please do not use e-mail template here, please add direct job parameter.)

Multiple job execution can not be performed.

If you make a job start every minute, if execution of this job is not completed in 1 minute, a new job will not be executed.