Skip to content

Commit 38f6af4

Browse files
committed
fix mail
1 parent 1ff66ce commit 38f6af4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/nuxt/sendMail.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ export const sendMail: ReturnType<typeof createTransport>['sendMail'] = async (
1111
) => {
1212
if (!transport) {
1313
if (process.env.ON_SERVER) {
14-
transport = createTransport({
15-
host: process.env.SMTP_SERVER,
16-
port: 25,
17-
// secure: true, // true for 465, false for other ports
14+
transport = createTransport({
15+
host: process.env.SMTP_SERVER || '',
16+
port: parseInt(process.env.SMTP_PORT || '1'),
1817
auth: {
19-
user: process.env.SMTP_USER,
20-
pass: process.env.SMTP_PASS
18+
user: process.env.SMTP_USERNAME || '',
19+
pass: process.env.SMTP_PASSWORD || ''
2120
}
2221
})
2322
} else {

0 commit comments

Comments
 (0)