Skip to content

Commit 8747769

Browse files
committed
Update MG transport
1 parent 59139c4 commit 8747769

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

app/api/email.mjs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import nodemailer from 'nodemailer'
2-
import mg from 'nodemailer-mailgun-transport'
2+
import MailgunTransport from 'mailgun-nodemailer-transport'
33

44
const auth = {
5-
auth: {
6-
api_key: process.env.MAILGUN_KEY,
7-
domain: 'mg.colepeters.com',
8-
},
5+
apiKey: process.env.MAILGUN_KEY,
6+
domain: 'mg.colepeters.com',
97
}
108

11-
const transporter = nodemailer.createTransport(mg(auth))
9+
const transporter = nodemailer.createTransport(new MailgunTransport({ auth }))
1210

1311
const mailer = async ({ name, email, message }) => {
1412
const from = `${name} <${email}>`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
"@enhance/image": "^1.0.0",
1717
"@enhance/styles-cribsheet": "^0.0.11",
1818
"nodemailer": "^6.9.13",
19-
"nodemailer-mailgun-transport": "^2.1.5"
19+
"mailgun-nodemailer-transport": "^3.0.2"
2020
}
2121
}

0 commit comments

Comments
 (0)