Backend & Frontend mit Mail Versand

This commit is contained in:
2025-01-08 12:16:49 +01:00
parent c62edc9cc1
commit 368257633b
27 changed files with 15833 additions and 323 deletions

40
api/src/app/app.module.ts Normal file
View File

@@ -0,0 +1,40 @@
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { MailerModule, MailerService } from '@nestjs-modules/mailer';
import { join } from 'path';
import { HandlebarsAdapter } from '@nestjs-modules/mailer/dist/adapters/handlebars.adapter';
@Module({
imports: [MailerModule.forRootAsync({
useFactory: () => ({
transport: {
host: 'email-smtp.us-east-2.amazonaws.com',
secure: false,
port: 587,
auth: {
user: 'AKIAU6GDWVAQ2QNFLNWN',//process.env.AMAZON_USER, ,
pass: 'BDE9nZv/ARbpotim1mIOir52WgIbpSi9cv1oJoH8oEf7'//process.env.AMAZON_PASSWORD,
},
},
defaults: {
from: '"No Reply" <noreply@example.com>',
},
template: {
dir: join(__dirname, 'assets'),
adapter: new HandlebarsAdapter({
eq: function (a, b) {
return a === b;
},
}),
options: {
strict: true,
},
},
}),
}),],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}