The asynchronous task queue persisted into database. This module contains jobs for sending e-mail and updating FTS indexes.
Partial and environment variables
Model partial config adds application.customSettings.mailerConfig section:
mailerConfig.enableScheduler- enable mail sending UB schedulermailerConfig.useExternalScheduler- some external scheduler is used to run mail job (rabbitMQ for example)mailerConfig.targetHost- SMTP hostmailerConfig.targetPort- SMTP portmailerConfig.user- if authentication required - SMTP usernamemailerConfig.password- f authentication required - SMTP user passwordmailerConfig.autoTLS- is TLS required for SMTP connectionmailerConfig.fullSSL- establish TLS connection before any SMTP commandmailerConfig.auth=false- use authentication to the SMTP servermailerConfig.fromAddr- Default from addressmailerConfig.repeatSendingOnError- iffalse(default)ubq_messageis marked as success even in case of mail message sending error (for example, invalid user etc.). Iftrue- message marked as success only if SMTP server accept letter.
Used environment variables:
| Variable name | Default | Description |
|---|---|---|
| UB_USE_MAIL_SCHEDULER | true | is mailer scheduler enabled |
| UB_USE_MAIL_EXTERNAL_SCHEDULER | false | some external scheduler or autotest stubs are used to run mail job |
| UB_SMTP_HOST | SMTP host | |
| UB_SMTP_PORT | 25 | SMTP port |
| UB_SMTP_FROMADDR | no-reply@fake.com | Default from address |
| UB_SMTP_USER | if authentication required - SMTP user name | |
| UB_SMTP_PWD | if authentication required - SMTP user password | |
| UB_SMTP_TLS | false | is TLS required for SMTP connection |
| UB_SMTP_AUTH | false | use authentication to the SMTP server |
| UB_SMTP_FULL_SSL | false | establish TLS connection before any SMTP command |
| UB_SMTP_REPEAT_ON_ERROR | false | skip mark message as successes on SMTP sending error |
Parameters for known mailers
GMail SMTP params
Envs
UB_SMTP_HOST=smtp.gmail.com
UB_SMTP_PORT=587
UB_SMTP_PWD=....
UB_SMTP_AUTH=true
UB_SMTP_FULL_SSL=true
UB_SMTP_TLS=false
Office365 SMTP parameters
Env
UB_SMTP_HOST=smtp.office365.com
UB_SMTP_PORT=587
UB_SMTP_PWD=.....
UB_SMTP_AUTH=true
UB_SMTP_FULL_SSL=false
UB_SMTP_TLS=true
Classes
Submodules
Types
# ubqMailAttachmentAttrs inner
Properties
ID: numberattachment: stringAttachment
mi_owner: number | ubaUserAttrsmi_createDate: Datemi_createUser: number | ubaUserAttrsmi_modifyDate: Datemi_modifyUser: number | ubaUserAttrs
# ubqMessagesAttrs inner
Properties
ID: numberqueueCode: stringQueue code
msgCmd: stringCommand
msgData: stringMessage data
msgPriority: numberPriority
completeDate: DateComplete date
mi_owner: number | ubaUserAttrsmi_createDate: Datemi_createUser: number | ubaUserAttrsmi_modifyDate: Datemi_modifyUser: number | ubaUserAttrs
# ubqRunstatAttrs inner
Properties
ID: numberappName: stringApplication name
schedulerName: stringScheduler name
startTime: DateTime of start scheduler item
endTime: DateTime of end scheduler item
logText: stringLog from runned script about all actions
resultError: numberResult error code. 0=No error
resultErrorMsg: stringError text message if resultError > 1
# ubqSchedulerAttrs inner
Properties
ID: numberID
name: stringJob name
schedulingCondition: stringCondition to schedule a job
cron: stringCron record
description: stringDescription
command: stringCommand
module: stringModule
singleton: booleanSingleton
runAs: stringrunAs
logSuccessful: booleanLog a Successful execution
overridden: booleanOverridden
originalModel: stringOriginalModel
actualModel: stringActual model
