feat: Implement send email action
This commit is contained in:
@@ -1,18 +1,8 @@
|
||||
import { IGlobalVariable } from '@automatisch/types';
|
||||
import nodemailer, { TransportOptions } from 'nodemailer';
|
||||
import transporter from '../common/transporter';
|
||||
|
||||
const verifyCredentials = async ($: IGlobalVariable) => {
|
||||
const client = 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);
|
||||
|
||||
await client.verify();
|
||||
await transporter($).verify();
|
||||
|
||||
await $.auth.set({
|
||||
screenName: $.auth.data.username,
|
||||
|
Reference in New Issue
Block a user