Avoid sending mails in localhost


#1

in my application there are many actions that send messages, to enable rapid testing I wonder if there is a way to prevent send mails while I’m running tests on my local version


#2

I’m using the Meteor email package and SendGrid


#3

don’t set the MAIL_URL environment variable while in development

you can reset the environment var within your app:

if (process.env.NODE_ENV == "development")
   delete process.env.MAIL_URL;

or you could check whether you’re running in localhost