...
 
Commits (2)
......@@ -4,5 +4,6 @@ export const frontendDomain = 'emailprivacytester.com';
export const frontendUrl = 'http://localhost:3000';
export const longPollTimeout = 25000;
export const mailSenderDomain = 'emailprivacytester.com';
export const mailServer = 'smtp://localhost';
export const mailServerHost = 'localhost';
export const mailServerPort = 25;
export const mongoUrl = 'mongodb://127.0.0.1:27017';
......@@ -77,7 +77,7 @@ app.get('/testResults', testResultsRoute);
(() => {
const port = parseInt(backendUrl.match(/^https?:\/\/[^\/]+:([0-9]+)/i)[1], 10);
const port = process.env.PORT;
app.listen(port, () => {
......
import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import nodeMailer from 'nodemailer';
import Optouts from './db/model/Optouts';
import nodeMailer from 'nodemailer';
import smtpTransport from 'nodemailer-smtp-transport';
import Optouts from './db/model/Optouts';
import {
mailServer,
mailServerHost,
mailServerPort,
mailSenderDomain,
} from '../config';
const transporter = nodeMailer.createTransport(mailServer);
const transporter = nodeMailer.createTransport(smtpTransport({
host: mailServerHost || 'localhost',
port: mailServerPort || 25,
ignoreTLS: (!mailServerHost || mailServerHost === 'localhost'),
secure: !(!mailServerHost || mailServerHost === 'localhost'),
}));
function replaceTemplateParams (msg, params) {
......