API and interface for sending transactional emails with node.js (own smtp server needed yet).
HTML JavaScript CSS Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
components
config
lib
models
tests
views
.gitignore
.gitmodules
.travis.yml
Gruntfile.js
Makefile
api.js
package.json
readme.md
server.js
testrunner.js

readme.md

Melone Transaction Mail API

Build Status Dependency Status

Config

Change config with export MELONE_CONFIG=my_config.json. A default config is provided in config/default.json.

Install

Install dependencies and database scheme with (sudo) make install and delete the scheme with make uninstall.

Usage

Start the interface with node server.js and the api (send/track emails) with node api.js.

Sending emails

URL

[POST] http://localhost:8080/api/mail/send

Body

{
 "key": "f8a6657dc19b61cbd142c57ebb381128",
 "secret": "524f3bc30d23f70b300877885a48509c",
 "to": [
   {
     "email": "receiver@gmail.com",
     "name": "Tom Test",
     "vars": {
       "name": "Tom Test"
     }
   }
 ],
 "subject": "Test Email",
 "content": {
   "html": {
     "text": "<h1>#{heading} #{name}</h1><p>This is a <a href='#{url}'>test</a> email</p>",
     "vars": {
       "url": "http://www.example.com"
     }
   },
   "plain": {
     "text": "#{heading} #{name}\n\nThis is a test email:\n#{url}",
     "vars": {
       "url": "www.example.com"
     }
   },
   "vars": {
      "heading": "Hello"
   }
 },
 "tracking": {
   "open": true,
   "links": true
 }
}

Response

{
  "status": "ok"
}

Screenshots

Statistics on the frontpage

View template

Link report