I need a way to prevent Magento sending any email to a specific user group.

For example I have a user group called "NoMail"

If a customer is created in that group i wold like Magento to NOT SEND any of the emails (creation, order, coment, credit memo, shipping).

Is there a file where i can set a contdition like

if UserGroup = (NoMail):
 else if
    send email code......


1 Answer 1


There are unfortunately no events in the Mage_Core_Model_Email_Template and Mage_Core_Model_Email classes.

You have to extend the Core Email Model

  1. Rewrite Mage_Core_Model_Email_Template
  2. only rewrite the send() function and put your condition there.

call parent send() function in extended function.

class Your_Module_Model_Core_Email_Template extends Mage_Core_Model_Email_Template {

public function send($email, $name = null, array $variables = array())
    //your logic
    /*if UserGroup = (NoMail):
   else if 
       $return = parent::send($email, $name, $variables); */

   return $return;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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