Skip to end of metadata
Go to start of metadata

Introduction

This article provides information on how to configure e-mail parameters in JobSchedulerManagedMailJob.

Job Parameters

The parameters for this job may be set as job or order parameters

ParameterDescriptionRequired
tomail recipient(s)Yes
cccc recipient(s)no
bccbcc recipient(s)no
frommail senderno
from_namename of the senderno
reply_toreply addressno
subjectMail Subjectno
hostmail server hostno
portmail server port no
smtp_usersmtp usernameno
smtp_passwordsmtp user passwordno
queue_directoryMail queue directory. Mails which cannot be transferred will be put here. The JobScheduler will later retry to send these mails.no
bodyMail bodyno
content_typecontent_type of the mail (text/plain, text/html...)no
encodingencoding of the mail (7bit, Quoted-Printable, Base64)no
charsetcharset of the mailno
attachment_content_typecontent_type of attachments (application/octet-stream, application/pdf...)no
attachment_encodingencoding of attachments (7bit, Quoted-Printable, Base64)no
attachment_charsetcharset of attachmentsno
attachmentFilename and path of the attachment(s) (multiple attachments separated by ";")no

A Simple JITL Send Email Example

Following example shows a basic job configuration of JobSchedulerManagedMailJob. It is been configured to send e-mail to a fix e-mail address along with a fix e-mail body and subject line. 

See example 01_SendEmail.job_chain.xml in the downloadable example.

Icon

When JobSchedulerManagedMailJob does not specify mail server host, port, smtp user and smtp user password, JITL job will apply default mail configuration from $SCHEDULER_DATA/config/factory.ini fils [smtp] section.

Simple JITL Send Email Job  Expand source

 

Dynamically configure email subject and body text 

As any other JITL job JobSchedulerManagedMailJob's parameters can also be configured dynamically using a pre-processing monitor. In the following example we will dynamically set the value for parameters subject and body

The outgoing mails body and subject will be dynamically configured depending upon weekday.

See example 02_ProcessingDayEmail.job_chain.xml in the downloadable example.

Configure subject and body text dynamically  Expand source

 

Dynamically configure email subject, body and attachment file name

A common use case for configuring subject, body and file attachment is when a job chain is triggered using a file order source and file should be attached to the outgoing e-mail or the file name needs to be specified in the mail's body text.

In the following example we will take a complex example of sending e-mail with attachments, also following example shows how to create custom e-mail message body and at run-time replace information such as the file name. 

In the following example a job is using a file name from JobScheduler's order parameter scheduler_file_path.

See example 03_SendInvoiceEmail.job_chain.xml in the downloadable example.

Configure email subject, body and attachment file  Expand source

 

See also 

 

 

 

 

  • No labels