返回 AiToEarn
mail.config.ts
根目录 / project / aitoearn-electron / server / config / mail.config.ts
1 /*
2 * @Author: nevin
3 * @Date: 2022-01-20 11:05:02
4 * @LastEditors: nevin
5 * @LastEditTime: 2024-07-05 15:52:13
6 * @Description: 邮件服务配置文件
7 */
8 import { MailerOptions } from '@nestjs-modules/mailer';
9
10 export const mailConfig: MailerOptions = {
11 transport: {
12 host: process.env.MAIL_HOST || 'smtp.feishu.cn',
13 port: 465,
14 secure: true,
15 auth: {
16 user: process.env.MAIL_AUTH_USER || 'hello@aiearn.ai',
17 pass: process.env.MAIL_AUTH_PASS || 'xxxx',
18 },
19 debug: true,
20 },
21 defaults: {
22 from: `aitoearn <hello@aiearn.ai>`,
23 },
24 };
25
26 export default () => ({
27 MAIL_CONFIG: mailConfig,
28 });
29
29 lines TYPESCRIPT