mirror of
https://github.com/outline/outline.git
synced 2026-11-25 15:15:15 +03:00
fix: No-op sending emails in self-hosted if configuration is unavailable rather than retrying
towards #7982
This commit is contained in:
1 parent
64c7a89e4d
commit
90efd707d9
1 file changed
+9
@@ -51,6 +51,15 @@ export default abstract class BaseEmail<
|
||||
* @returns A promise that resolves once the email is placed on the task queue
|
||||
*/
|
||||
public schedule(options?: Bull.JobOptions) {
|
||||
// No-op to schedule emails if SMTP is not configured
|
||||
if (!env.SMTP_FROM_EMAIL) {
|
||||
Logger.info(
|
||||
"email",
|
||||
`Email ${this.constructor.name} not sent due to missing SMTP configuration`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const templateName = this.constructor.name;
|
||||
|
||||
Metrics.increment("email.scheduled", {
|
||||
|
||||
Reference in new issue
Block a user