Skip to content

Commit e35122a

Browse files
authored
Bumped @tryghost/nodemailer in ghost/core (TryGhost#27686)
no ref `ghost/core` was pinning `@tryghost/nodemailer@0.3.48`, two majors behind the latest published `2.2.0`.
1 parent d713982 commit e35122a

3 files changed

Lines changed: 674 additions & 389 deletions

File tree

ghost/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
"@tryghost/mongo-utils": "0.6.3",
126126
"@tryghost/mw-error-handler": "1.0.13",
127127
"@tryghost/mw-vhost": "1.0.6",
128-
"@tryghost/nodemailer": "0.3.48",
128+
"@tryghost/nodemailer": "2.2.0",
129129
"@tryghost/nql": "0.12.10",
130130
"@tryghost/nql-lang": "0.6.4",
131131
"@tryghost/parse-email-address": "workspace:*",

ghost/core/test/unit/server/services/mail/ghost-mailer.test.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ describe('Mail: Ghostmailer', function () {
7575
mailer = new mail.GhostMailer();
7676

7777
assert('transport' in mailer);
78-
assert.equal(mailer.transport.transporter.name, 'SMTP (direct)');
78+
assert.equal(mailer.transport.transporter.name, 'SMTP');
79+
assert.equal(mailer.transport.transporter.options.direct, true);
7980
});
8081

8182
it('sends valid message successfully ', function (done) {
@@ -130,17 +131,20 @@ describe('Mail: Ghostmailer', function () {
130131
});
131132

132133
it('return correct failure message for domain doesn\'t exist', async function () {
133-
assert.equal(mailer.transport.transporter.name, 'SMTP (direct)');
134+
assert.equal(mailer.transport.transporter.name, 'SMTP');
135+
assert.equal(mailer.transport.transporter.options.direct, true);
134136
await assert.rejects(mailer.send(mailDataNoDomain), /Failed to send email/);
135137
});
136138

137139
it('return correct failure message for no mail server at this address', async function () {
138-
assert.equal(mailer.transport.transporter.name, 'SMTP (direct)');
140+
assert.equal(mailer.transport.transporter.name, 'SMTP');
141+
assert.equal(mailer.transport.transporter.options.direct, true);
139142
await assert.rejects(mailer.send(mailDataNoServer), /Failed to send email/);
140143
});
141144

142145
it('return correct failure message for incomplete data', async function () {
143-
assert.equal(mailer.transport.transporter.name, 'SMTP (direct)');
146+
assert.equal(mailer.transport.transporter.name, 'SMTP');
147+
assert.equal(mailer.transport.transporter.options.direct, true);
144148
await assert.rejects(mailer.send(mailDataIncomplete), /Incomplete message data/);
145149
});
146150
});

0 commit comments

Comments
 (0)