Sends notifications trough calls to rest interface.
Currently supports the following notification types:
How to use the running application
POST /mail
Json Request:
{
"to": "...",
"from": "...", // (optional)
"reply_to": "...", // (optional)
"content_type": "...", // (optional)
"subject": "...",
"body": "..."
}Steps to run the application. this include configuration and key files at the moment
The application is configured through environment variables.
GOTIFY_WEB_PORT: Port for the web service, defaults to8080(string)GOTIFY_RPC_PORT: Port for the rpc service, defaults to8090(string)GOTIFY_DEBUG_MODE: Bool indicating debug mode defaults tofalseGOTIFY_GOOGLE_MAIL_KEYFILE: the file described in Google config file defaults togapps.jsonGOTIFY_MAIL_DEFAULT_FROM: Defaultfromaddress in the mail, defaults toadmin@chalmers.itGOTIFY_MAIL_DEFAULT_REPLY_TO: Defaultreply_toaddress in the mail, defaults tono-reply@chalmers.itGOTIFY_MAIL_DEFAULT_CONTENT_TYPE: Defaultcontent_typein mail, default sotext/html; charset=ISO-8859-1GOTIFY_MOCK_MODE: Enable mock mode, defaults tofalseGOTIFY_ENVIRONMENT: (test|production|development), defaults todevelopment
This file (gapps.json by default config) should be placed in the working directory
(digIT can find this file on their wiki)
Go to Google developer console to retrieve this file
- go to credentials
- create a project for this app if you don't already have one
- create new service account för this app
- use the downloaded file
You must also allow mail api calls:
- go to security > advanced settings > Manage API client access
- use the
client_idfrom the credentials file previously retrieved - use api scope
https://www.googleapis.com/auth/gmail.send
To start a dockerized development environment with hot-reloading:
$ make devTo start a non-dockerized development environment:
$ make runPlease referer to the software design document before starting development: DESIGN.md
- Set the
mock-modeconfig/environment variable to true - Enjoy