AFFiNE/apps/server/scripts/test-send-local-mail.ts

19 lines
348 B
TypeScript
Raw Normal View History

2023-09-02 21:13:59 +03:00
import { createTransport } from 'nodemailer';
const transport = createTransport({
host: '0.0.0.0',
port: 1025,
secure: false,
auth: {
user: 'himself65',
pass: '123456',
},
});
await transport.sendMail({
from: 'noreply@toeverything.info',
to: 'himself65@outlook.com',
subject: 'test',
html: `<div>hello world</div>`,
});