Merge pull request #411 from jorilallo/jori/reply-to
Added optional reply to address
This commit is contained in:
@@ -49,6 +49,7 @@ Object {
|
||||
</body>
|
||||
</html>
|
||||
",
|
||||
"replyTo": "hello@example.com",
|
||||
"subject": "Welcome to Outline",
|
||||
"text": "
|
||||
Welcome to Outline!
|
||||
|
||||
@@ -45,7 +45,8 @@ class Mailer {
|
||||
|
||||
try {
|
||||
await transporter.sendMail({
|
||||
from: process.env.SMTP_SENDER_EMAIL,
|
||||
from: process.env.SMTP_FROM_EMAIL,
|
||||
replyTo: process.env.SMTP_REPLY_EMAIL || process.env.SMTP_FROM_EMAIL,
|
||||
to: data.to,
|
||||
subject: data.title,
|
||||
html: html,
|
||||
|
||||
@@ -6,6 +6,8 @@ describe('Mailer', () => {
|
||||
let sendMailOutput;
|
||||
|
||||
beforeEach(() => {
|
||||
process.env.SMTP_FROM_EMAIL = 'hello@example.com';
|
||||
|
||||
fakeMailer = new Mailer();
|
||||
fakeMailer.transporter = {
|
||||
sendMail: output => (sendMailOutput = output),
|
||||
|
||||
Reference in New Issue
Block a user