diff --git a/packages/email/email.js b/packages/email/email.js index cbe588c2ae..350109bb59 100644 --- a/packages/email/email.js +++ b/packages/email/email.js @@ -293,7 +293,7 @@ Email.sendAsync = async function (options) { if (Meteor.isProduction && !mailUrlEnv && !mailUrlSettings) { // This check is mostly necessary when using the flag --production when running locally. // And it works as a reminder to properly set the mail URL when running locally. - new Error( + throw new Error( 'You have not provided a mail URL. You can provide it by using the environment variable MAIL_URL or your settings. You can read more about it here: https://docs.meteor.com/api/email.html.' ); }