Skip to content

Commit 8749053

Browse files
committed
Fixed reply to not rendering
1 parent 677d588 commit 8749053

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

template.pug

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,14 @@ html
110110
if replyTo
111111
tr
112112
th replyTo
113-
td= replyTo
113+
td
114+
if Array.isArray(replyTo)
115+
each t, ti in replyTo
116+
= `${t.name} <${t.address}>`.trim()
117+
if to.length - 1 !== ti
118+
= ', '
119+
else
120+
= `${replyTo.name} <${replyTo.address}>`.trim()
114121
if inReplyTo
115122
tr
116123
th inReplyTo

test/test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ test('opens a preview email', async t => {
1717
subject: 'Hello world',
1818
html: `<p>Hello world</p>`,
1919
text: 'Hello world',
20+
replyTo: 'niftylettuce <niftylettuce+replyto@gmail.com>',
21+
inReplyTo: 'in reply to',
2022
attachments: [
2123
{ filename: 'hello-world.txt', content: 'Hello world' },
2224
{ path: path.join(__dirname, '..', '.editorconfig') },

0 commit comments

Comments
 (0)