Mailer & print config fix #257
This commit is contained in:
parent
125c6dea37
commit
b97eac4978
|
@ -1,7 +1,5 @@
|
|||
FROM node:8.9.4
|
||||
|
||||
RUN mkdir /nginx
|
||||
COPY nginx/config.yml /nginx
|
||||
COPY mailer /app
|
||||
COPY loopback /loopback
|
||||
|
||||
|
|
|
@ -12,9 +12,6 @@ module.exports = {
|
|||
* Load mail config.
|
||||
*/
|
||||
init: function() {
|
||||
if (process.env.NODE_ENV == 'test')
|
||||
return;
|
||||
|
||||
this.transporter = nodemailer.createTransport(config.smtp);
|
||||
|
||||
this.transporter.verify(function(error, success) {
|
||||
|
@ -37,9 +34,6 @@ module.exports = {
|
|||
* @param {Object} cb - Callback
|
||||
*/
|
||||
send: function(recipient, subject, body, attachments, params, cb) {
|
||||
if (config.env == 'test')
|
||||
return;
|
||||
|
||||
let mailOptions = {
|
||||
from: '"' + config.app.senderName + '" <' + config.app.senderMail + '>',
|
||||
to: recipient,
|
||||
|
@ -48,7 +42,7 @@ module.exports = {
|
|||
attachments
|
||||
};
|
||||
|
||||
if (config.env == 'development')
|
||||
if (config.env != 'production')
|
||||
mailOptions.to = config.app.senderMail;
|
||||
|
||||
this.transporter.sendMail(mailOptions, (error, info) => {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
FROM node:8.9.4
|
||||
|
||||
RUN mkdir /nginx
|
||||
COPY nginx/config.yml /nginx
|
||||
COPY print /app
|
||||
COPY loopback /loopback
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,7 +10,7 @@
|
|||
"html-pdf": "^2.2.0",
|
||||
"inline-css": "^2.2.2",
|
||||
"mustache": "^2.3.0",
|
||||
"mysql": "^2.13.0",
|
||||
"mysql2": "^1.5.3",
|
||||
"path": "^0.12.7",
|
||||
"require-yaml": "0.0.1",
|
||||
"strftime": "^0.10.0"
|
||||
|
|
Loading…
Reference in New Issue