tethys.backend/config/mail.ts
Arno Kaimbacher b06ccae603
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m2s
- added @adonisjs/mail
- mail_settings_controller for setting smtp settings
- added view ror rjecting dataset for editor
- added new model AppConfig for stroing appwide config values
- better validate_chesum.ts command with process chunking
- added vue3 apps 'BasicSettings' like email, profile settings
- started with 2 multilingual capabilities
- npm updates
2024-09-16 17:59:46 +02:00

76 lines
1.8 KiB
TypeScript

import env from '#start/env'
import { defineConfig, transports } from '@adonisjs/mail'
const mailConfig = defineConfig({
default: 'smtp',
/**
* The mailers object can be used to configure multiple mailers
* each using a different transport or same transport with different
* options.
*/
mailers: {
smtp: transports.smtp({
host: env.get('SMTP_HOST', ''),
port: env.get('SMTP_PORT'),
secure: false,
// ignoreTLS: true,
requireTLS: false,
/**
* Uncomment the auth block if your SMTP
* server needs authentication
*/
/* auth: {
type: 'login',
user: env.get('SMTP_USERNAME'),
pass: env.get('SMTP_PASSWORD'),
}, */
}),
resend: transports.resend({
key: env.get('RESEND_API_KEY'),
baseUrl: 'https://api.resend.com',
}),
},
})
export default mailConfig
declare module '@adonisjs/mail/types' {
export interface MailersList extends InferMailers<typeof mailConfig> {}
}
// const mailConfig = defineConfig({
// default: 'smtp',
// /**
// * The mailers object can be used to configure multiple mailers
// * each using a different transport or same transport with different
// * options.
// */
// mailers: {
// smtp: transports.smtp({
// host: env.get('SMTP_HOST', ''),
// port: env.get('SMTP_PORT'),
// /**
// * Uncomment the auth block if your SMTP
// * server needs authentication
// */
// /* auth: {
// type: 'login',
// user: env.get('SMTP_USERNAME'),
// pass: env.get('SMTP_PASSWORD'),
// }, */
// }),
// resend: transports.resend({
// key: env.get('RESEND_API_KEY'),
// baseUrl: 'https://api.resend.com',
// }),
// },
// })