var api = require('./index.js'); var args = { 'to': 'alejandro@email.com', 'from': 'anonymous@anonemail.com', 'subject': 'Test', 'body': 'Test', 'username': 'anonemail', 'password': 'test', }; api.send_email(args, 'callback_function')
This code is the example that appears on the github page. It creates an object called 'args' which is the JSON object that is passed to the 'send_email' method. THe 'send_email' method takes two arguments, a JSON object and a callback function. The callback function will be called when the API returns data.