FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    I want to send email from my docker image

    Scheduled Pinned Locked Moved
    Q&A
    email docker
    0
    2
    2.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • danD
      dan
      last edited by

      I am using the docker install and want to send email from that for testing purposes. Any suggestions?

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 1
      • danD
        dan
        last edited by

        I end up using a docker image of mailcatcher.

        I use the default docker-compose.yml, but use this docker-compose.override.yml:

        version: '3'
        
        services:
          mailcatcher:
            image: yappabe/mailcatcher
            ports:
              - "1025:1025"
              - "1080:1080"
            networks:
              - mailcatcher
        
          search:
            image: docker.elastic.co/elasticsearch/elasticsearch:7.8.1
            environment:
              cluster.name: fusionauth
              bootstrap.memory_lock: "true"
              discovery.type: single-node
              FUSIONAUTH_SEARCH_MEMORY: ${FUSIONAUTH_SEARCH_MEMORY}
              ES_JAVA_OPTS: ${ES_JAVA_OPTS}
            # Un-comment to access the search service directly
            # ports:
            #  - 9200:9200
            #  - 9300:9300
            networks:
              - search
            restart: unless-stopped
            ulimits:
              memlock:
                soft: -1
                hard: -1
            volumes:
              - es_data:/usr/share/elasticsearch/data
        
          fusionauth:
            depends_on:
              - search
              - mailcatcher
            environment:
              SEARCH_SERVERS: http://search:9200
              SEARCH_TYPE: elasticsearch
            networks:
              - mailcatcher
              - search
        
        networks:
          search:
            driver: bridge
          mailcatcher:
            driver: bridge
        
        volumes:
          es_data:
        

        Then I configure the SMTP settings to use the hostname mailcatcher and the port 1025. I can then send email and view it in the mailcatcher interface, at localhost:1080.

        Here's the relevant dockerfile: https://github.com/yappabe/docker-mailcatcher/blob/master/Dockerfile

        Here's more about mailcatcher: https://mailcatcher.me/

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 2
        • First post
          Last post