This article provides information on how to configure e-mail parameters in JobSchedulerManagedMailJob.
The parameters for this job may be set as job or order parameters
|from_name||name of the sender||no|
|host||mail server host||no|
|port||mail server port||no|
|smtp_password||smtp user password||no|
|queue_directory||Mail queue directory. Mails which cannot be transferred will be put here. The JobScheduler will later retry to send these mails.||no|
|content_type||content_type of the mail (text/plain, text/html...)||no|
|encoding||encoding of the mail (7bit, Quoted-Printable, Base64)||no|
|charset||charset of the mail||no|
|attachment_content_type||content_type of attachments (application/octet-stream, application/pdf...)||no|
|attachment_encoding||encoding of attachments (7bit, Quoted-Printable, Base64)||no|
|attachment_charset||charset of attachments||no|
|attachment||Filename 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.
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.
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
See example 03_SendInvoiceEmail.job_chain.xml in the downloadable example.