Skip to content

Instantly share code, notes, and snippets.

@bonfil1
Forked from fredysan/Docksal-Mailhog-Drupal.md
Created January 28, 2021 17:21
Show Gist options
  • Save bonfil1/3078fdf9826ee6332cb90dccef25604a to your computer and use it in GitHub Desktop.
Save bonfil1/3078fdf9826ee6332cb90dccef25604a 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