Categorygithub.com/modfin/mmailer
repositorypackage
0.0.0-20231009123607-1391c1fc8ecb
Repository: https://github.com/modfin/mmailer.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

mMailer

Unify email services into 1 api for transactional email, have redundancies, traffic and avoid vendor locking

SELECT_STRATEGY=RoundRobin \
SERVICES="generic:smtp://user:[email protected]:25 mailjet:pubkeyXXXX:secretkeyYYYY" \
mmailerd
 
# Services:
#  - Generic: posthooks are not implmented, adding smtp://user:[email protected]:25
#  - Mailjet: add the following posthook url  example.com/path/to/mmailer/posthook?service=mailjet
# Select Strategy: RoundRobin
# Retry Strategy:  None

# > Send mail by HTTP POST example.com/path/to/mmailer/send?key=

# Starting server, :8080
curl 'http://localhost:8080/send' \
  --data-binary \
  $'{"from": {"email": "[email protected]",
              "name": "Jon Doe"    },
     "to": [{"email": "[email protected]",
             "name": "Jane Doe"}],
     "subject": "A subject",
     "html": "<p><strong>Hey</strong> this is where the html gos</p>"
    }' --compressed