We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c86119 commit b595a0dCopy full SHA for b595a0d
server/emails/templates/BaseEmail.tsx
@@ -51,6 +51,15 @@ export default abstract class BaseEmail<
51
* @returns A promise that resolves once the email is placed on the task queue
52
*/
53
public schedule(options?: Bull.JobOptions) {
54
+ // No-op to schedule emails if SMTP is not configured
55
+ if (!env.SMTP_FROM_EMAIL) {
56
+ Logger.info(
57
+ "email",
58
+ `Email ${this.constructor.name} not sent due to missing SMTP configuration`
59
+ );
60
+ return;
61
+ }
62
+
63
const templateName = this.constructor.name;
64
65
Metrics.increment("email.scheduled", {
0 commit comments