Skip to content
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}_USER⚪Smtp user
DD_TRIGGER_SMTP_{trigger_name}_PASS⚪Smtp password
DD_TRIGGER_SMTP_{trigger_name}_TLS_ENABLED⚪Use TLStrue, falsefalse
DD_TRIGGER_SMTP_{trigger_name}_TLS_VERIFY⚪Verify server TLS certificatetrue, falsetrue
DD_TRIGGER_SMTP_{trigger_name}_ALLOWCUSTOMTLD⚪Allow custom tlds for the email addressestrue, falsefalse
This trigger also supports the common configuration 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 
For Gmail, you need to create an application specific password first (See gmail documentation).