feat: Implement send email action
This commit is contained in:
16
packages/backend/src/apps/smtp/common/transporter.ts
Normal file
16
packages/backend/src/apps/smtp/common/transporter.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { IGlobalVariable } from '@automatisch/types';
|
||||
import nodemailer, { TransportOptions } from 'nodemailer';
|
||||
|
||||
const transporter = ($: IGlobalVariable) => {
|
||||
return nodemailer.createTransport({
|
||||
host: $.auth.data.host,
|
||||
port: $.auth.data.port,
|
||||
secure: $.auth.data.useTls,
|
||||
auth: {
|
||||
user: $.auth.data.username,
|
||||
pass: $.auth.data.password,
|
||||
},
|
||||
} as TransportOptions);
|
||||
};
|
||||
|
||||
export default transporter;
|
Reference in New Issue
Block a user