@sparkz-community/messenger-server-lib
v0.2.0
Published
[![Build Status](https://travis-ci.org/feathersjs/ir-mailer-server.png?branch=master)](https://travis-ci.org/feathersjs/ir-mailer-server) [![Code Climate](https://codeclimate.com/github/feathersjs/ir-mailer-server/badges/gpa.svg)](https://codeclimate.com/
Downloads
20
Readme
ir-mailer-server
Installation
npm install ir-mailer-server --save
Documentation
TBD
Complete Example
Here's an example of a Feathers server that uses ir-mailer-server
.
const feathers = require('@feathersjs/feathers');
const plugin = require('messenger-server-lib');
// Initialize the application
const app = feathers();
// Initialize the plugin
app.configure(plugin());
Server side default.js
configuration example:
sms: {
default: 'twilio',
verifyResetUrl: lget(process.env, 'SMS_URL', clientUrl || serverUrl),
twilio: {
from: lget(process.env, 'TWILIO_FROM_PHONE', lget(process.env, 'FROM_NUMBER', '+15005550006')),
apiKey: lget(process.env, 'TWILIO_API_KEY'),
domain: lget(process.env, 'TWILIO_DOMAIN')
},
},
mailer: {
default: lget(process.env, 'MAILER_DEFAULT', 'mailgun'),
from: lget(process.env, 'FROM_EMAIL', '[email protected]'),
verifyResetUrl: lget(process.env, 'MAILER_URL') || clientUrl || serverUrl,
helpEmail: lget(process.env, 'HELP_EMAIL') || '[email protected]',
logo: lget(process.env, 'MAILER_LOGO') || 'default_url',
mailgun: {
host: lget(process.env, 'MAILGUN_HOST', 'smtp.mailgun.org'),
port: lget(process.env, 'MAILGUN_PORT', 587),
secure: false, // use SSL
auth: {
user: lget(process.env, 'MAILGUN_USER', 'sandbox user from mailgun.org'),
pass: lget(process.env, 'MAILGUN_PASS', 'blahblahblah')
},
tls:{
ciphers:'SSLv3'
}
},
sendgrid: {
host: lget(process.env, 'SENDGRID_HOST', 'smtp.sendgrid.net'),
port: lget(process.env, 'SENDGRID_PORT', 587),
secure: true,
auth: {
// apikey: lget(config, 'sendgrid.apiKey')
apiUser: lget(process.env, 'SENDGRID_API_USER'),
apiKey: lget(process.env, 'SENDGRID_API_KEY')
}
},
ses: {
host: lget(process.env, 'SES_HOST', 'email-smtp.us-west-2.amazonaws.com'),
port: lget(process.env, 'SES_PORT', 587),
secure: true,
auth: {
user: lget(process.env, 'SES_SMTP_USER'),
pass: lget(process.env, 'SES_SMTP_PASS')
}
},
sparkpost: {
host: lget(process.env, 'SPARKPOST_HOST', 'smtp.sparkpostmail.com'),
port: lget(process.env, 'SPARKPOST_PORT', 587),
secure: false,
ignoreTLS: false,
auth: {
user: lget(process.env, 'SPARKPOST_USER', 'SMTP_Injection'),
pass: lget(process.env, 'SPARKPOST_API_KEY', 'Spark Key')
},
tls:{
ciphers:'SSLv3'
}
}
}
License
Copyright (c) 2018
Licensed under the MIT license.