mailhog / MailHog

Web and API based SMTP testing
MIT License
14k stars 1.06k forks source link

Using authenticated mongo #334

Open ahrezaldy opened 3 years ago

ahrezaldy commented 3 years ago

Is there any way to use Authenticated MongoDB as mail storage? So far in config there are only Mongo URI, DB, & collection setting, but no setting for mongo auth.

masterkain commented 2 years ago
      - name: MH_STORAGE
        value: mongodb
      - name: MH_MONGO_DB
        value: mailhog
      - name: MH_MONGO_URI
        value: root:mailhog@mailhog-mongodb.kube-system.svc.cluster.local:27017
jancyril commented 2 years ago

Hi @masterkain, I wonder if you had tried to connect to Mongo Atlas? I tried doing something like this, but it can't connect. mongodb+srv://username:password@mongo-atlas.url.com

mipmip commented 1 year ago

This can only work if you use the PR: https://github.com/mailhog/storage/pull/12 You can compile a working version with: https://github.com/vmary2014/MailHog