Updated email envvars based on feedback
This commit is contained in:
parent
95a395aa95
commit
96b946488d
|
@ -18,5 +18,5 @@ SMTP_HOST=
|
||||||
SMTP_PORT=
|
SMTP_PORT=
|
||||||
SMTP_USERNAME=
|
SMTP_USERNAME=
|
||||||
SMTP_PASSWORD=
|
SMTP_PASSWORD=
|
||||||
SMTP_SENDER_EMAIL=
|
SMTP_FROM_EMAIL=
|
||||||
SMTP_REPLY_TO=
|
SMTP_REPLY_EMAIL=
|
|
@ -10,7 +10,7 @@ machine:
|
||||||
DATABASE_URL_TEST: postgres://ubuntu@localhost:5432/circle_test
|
DATABASE_URL_TEST: postgres://ubuntu@localhost:5432/circle_test
|
||||||
DATABASE_URL: postgres://ubuntu@localhost:5432/circle_test
|
DATABASE_URL: postgres://ubuntu@localhost:5432/circle_test
|
||||||
URL: http://localhost:3000
|
URL: http://localhost:3000
|
||||||
SMTP_SENDER_EMAIL: hello@example.com
|
SMTP_FROM_EMAIL: hello@example.com
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
override:
|
override:
|
||||||
|
|
|
@ -45,8 +45,8 @@ class Mailer {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await transporter.sendMail({
|
await transporter.sendMail({
|
||||||
from: process.env.SMTP_SENDER_EMAIL,
|
from: process.env.SMTP_FROM_EMAIL,
|
||||||
replyTo: process.env.SMTP_REPLY_TO || process.env.SMTP_SENDER_EMAIL,
|
replyTo: process.env.SMTP_REPLY_EMAIL || process.env.SMTP_FROM_EMAIL,
|
||||||
to: data.to,
|
to: data.to,
|
||||||
subject: data.title,
|
subject: data.title,
|
||||||
html: html,
|
html: html,
|
||||||
|
|
|
@ -6,6 +6,8 @@ describe('Mailer', () => {
|
||||||
let sendMailOutput;
|
let sendMailOutput;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
process.env.SMTP_FROM_EMAIL = 'hello@example.com';
|
||||||
|
|
||||||
fakeMailer = new Mailer();
|
fakeMailer = new Mailer();
|
||||||
fakeMailer.transporter = {
|
fakeMailer.transporter = {
|
||||||
sendMail: output => (sendMailOutput = output),
|
sendMail: output => (sendMailOutput = output),
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { shallow } from 'enzyme';
|
import { shallow } from 'enzyme';
|
||||||
import toJson from 'enzyme-to-json';
|
import toJson from 'enzyme-to-json';
|
||||||
|
|
Reference in New Issue