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 scheduler
  • mailerConfig.useExternalScheduler - some external scheduler is used to run mail job (rabbitMQ for example)
  • mailerConfig.targetHost - SMTP host
  • mailerConfig.targetPort - SMTP port
  • mailerConfig.user - if authentication required - SMTP username
  • mailerConfig.password - f authentication required - SMTP user password
  • mailerConfig.autoTLS - is TLS required for SMTP connection
  • mailerConfig.fullSSL - establish TLS connection before any SMTP command
  • mailerConfig.auth=false - use authentication to the SMTP server
  • mailerConfig.fromAddr - Default from address
  • mailerConfig.repeatSendingOnError - if false (default) ubq_message is marked as success even in case of mail message sending error (for example, invalid user etc.). If true - 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

# ubqMessagesAttrs inner

Properties

# ubqRunstatAttrs inner

Properties

  • ID number
  • appName string

    Application name

  • schedulerName string

    Scheduler name

  • startTime Date

    Time of start scheduler item

  • endTime Date

    Time of end scheduler item

  • logText string

    Log from runned script about all actions

  • resultError number

    Result error code. 0=No error

  • resultErrorMsg string

    Error text message if resultError > 1

# ubqSchedulerAttrs inner

Properties

  • ID number

    ID

  • name string

    Job name

  • schedulingCondition string

    Condition to schedule a job

  • cron string

    Cron record

  • description string

    Description

  • command string

    Command

  • module string

    Module

  • singleton boolean

    Singleton

  • runAs string

    runAs

  • logSuccessful boolean

    Log a Successful execution

  • overridden boolean

    Overridden

  • originalModel string

    OriginalModel

  • actualModel string

    Actual model