mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
API: Add env var to opt-out mailer setup verification (#13924)
* Add env var to opt-out mailer setup verification * Add documentation
This commit is contained in:
@@ -36,12 +36,14 @@ export class MailService {
|
||||
this.knex = opts?.knex || getDatabase();
|
||||
this.mailer = getMailer();
|
||||
|
||||
this.mailer.verify((error) => {
|
||||
if (error) {
|
||||
logger.warn(`Email connection failed:`);
|
||||
logger.warn(error);
|
||||
}
|
||||
});
|
||||
if (env.EMAIL_VERIFY_SETUP) {
|
||||
this.mailer.verify((error) => {
|
||||
if (error) {
|
||||
logger.warn(`Email connection failed:`);
|
||||
logger.warn(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async send(options: EmailOptions): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user