DrydockDrydock
ConfigurationTriggersSMTP

Smtp

The smtp trigger lets you send emails with smtp.

The smtp trigger lets you send emails with smtp.

Variables

Env varRequiredDescriptionSupported valuesDefault value when missing
DD_TRIGGER_SMTP_{trigger_name}_HOST🔴Smtp server hostValid hostname or IP address
DD_TRIGGER_SMTP_{trigger_name}_PORT🔴Smtp server portValid smtp port
DD_TRIGGER_SMTP_{trigger_name}_FROM🔴Email from addressValid email address
DD_TRIGGER_SMTP_{trigger_name}_TO🔴Email to addressValid email address
DD_TRIGGER_SMTP_{trigger_name}_USERSmtp user
DD_TRIGGER_SMTP_{trigger_name}_PASSSmtp password
DD_TRIGGER_SMTP_{trigger_name}_TLS_ENABLEDUse TLStrue, falsefalse
DD_TRIGGER_SMTP_{trigger_name}_TLS_VERIFYVerify server TLS certificatetrue, falsetrue
DD_TRIGGER_SMTP_{trigger_name}_ALLOWCUSTOMTLDAllow custom tlds for the email addressestrue, falsefalse
This trigger also supports the common configuration variables. In batch or digest mode, the email subject and body are rendered using the BATCHTITLE and common batch template variables.

Examples

Send an email with Gmail

services:
  drydock:
    image: codeswhat/drydock
    ...
    environment:
        - DD_TRIGGER_SMTP_GMAIL_HOST=smtp.gmail.com
        - DD_TRIGGER_SMTP_GMAIL_PORT=465
        - DD_TRIGGER_SMTP_GMAIL_USER=john.doe@gmail.com
        - DD_TRIGGER_SMTP_GMAIL_PASS=mysecretpass
        - DD_TRIGGER_SMTP_GMAIL_FROM=john.doe@gmail.com
        - DD_TRIGGER_SMTP_GMAIL_TO=jane.doe@gmail.com
        - DD_TRIGGER_SMTP_GMAIL_TLS_ENABLED=true 
docker run \
    -e DD_TRIGGER_SMTP_GMAIL_HOST="smtp.gmail.com" \
    -e DD_TRIGGER_SMTP_GMAIL_PORT="465" \
    -e DD_TRIGGER_SMTP_GMAIL_USER="john.doe@gmail.com" \
    -e DD_TRIGGER_SMTP_GMAIL_PASS="mysecretpass" \
    -e DD_TRIGGER_SMTP_GMAIL_FROM="john.doe@gmail.com" \
    -e DD_TRIGGER_SMTP_GMAIL_TO="jane.doe@gmail.com" \
    -e DD_TRIGGER_SMTP_GMAIL_TLS_ENABLED="true" \
  ...
  codeswhat/drydock
For Gmail, you need to create an application specific password first (See gmail documentation).

On this page