Skip to content

Instantly share code, notes, and snippets.

@fredysan
Last active January 28, 2021 17:21
Show Gist options
  • Save fredysan/ebe1f67b6a0ac730edd946b348cf04e9 to your computer and use it in GitHub Desktop.
Save fredysan/ebe1f67b6a0ac730edd946b348cf04e9 to your computer and use it in GitHub Desktop.
Configure Docksal to use Mail Hog and use it from Drupal

Configure Docksal to use Mail Hog and use it from Drupal 8

Docksal settings

# .docksal/docksal.yml

  cli:
    # Make sure that the cli image is updated.
    image: docksal/cli:2.11-php7.3
    environment:
      - DOCKSAL=true

  mail:
    extends:
      file: ${HOME}/.docksal/stacks/services.yml
      service: mail

Drupal 8 Settings - Swift mailer module

  • Transport type: SMTP
  • SMTP Server: mail
  • Port: 1025
# swiftmailer.transport.yml

transport: smtp
smtp_host: mail
smtp_port: 1025
smtp_encryption: '0'
smtp_credential_provider: swiftmailer
smtp_credentials:
  swiftmailer:
    username: ''
    password: ''
sendmail_path: '/usr/local/bin/mhsendmail '
sendmail_mode: t
spool_directory: ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment