I have a unique use case. I am currently using mailcontrol module to disabled the sending of emails when news users are created. However I got to thinking about this, and I was wondering if there is a way to create a Rule to prevent the email from sending so I wouldn't have to use the mailcontrol module.

  • Please include drupal version – Chris Happy Dec 11 '16 at 8:34

Maybe a custom module and lines in the setting.php?

Here is a simple tutorial showing how $message['send'] = FALSE; can stop it. Of course, you can also use if statments to add conditions.

Note: The developer does mention that you shouldn't use it on production...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.