I've been searching for a way to send an automatic email when placing a customer in a certain customergroup. I have had no luck finding exactly how to get that done if it's even possible. Suggestions with programming or through an extension would be welcome


It ought to be possible to hook into the customer_save_after or adminhtml_customer_save_after event, then compare getData('customer_group_id') vs getOrigData('customer_group_id') to see whether it was changed. If then the customer group Id fits the ID of the customer group you want to send the email for, you can use the Zend mail

$mail = new Zend_Mail();
$mail->setBodyHtml(" body text")

to send the email.

Didn't test this yet, though.


php code


     if ($object->getData('group_id') != $object->getOrigData('group_id')) {
//send mail
    } }

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.