Categorygithub.com/shishanksingh2015/email-sample
repositorypackage
0.0.0-20241121120520-415f3b98c32c
Repository: https://github.com/shishanksingh2015/email-sample.git
Documentation: pkg.go.dev

# Packages

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

# README

Email-sample

Check health of service

http :5000/health

Create token for athentication

http post :5000/generate-token [email protected]

Send email

export TOKEN=Get from Generate endpoint
curl -s -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    localhost:5000/v1/sendmail \
    --data-raw '{
        "from":"[email protected]",
        "from_name":"admin",
        "to":"[email protected]",
        "to_name":"mahdi",
        "subject":"salam",
        "content":"khobi?",
        ]
    }' | jq

Docker

Build docker image with Command docker build --rm -t email-sample-image .

Run the command docker run -p 5000:5000 email-sample-image