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());
default.js
configuration example:
Server side 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', 'account-management@sparkz.community.com'),
verifyResetUrl: lget(process.env, 'MAILER_URL') || clientUrl || serverUrl,
helpEmail: lget(process.env, 'HELP_EMAIL') || 'account-management@sparkz.community.com',
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.