I want to sent one email when we adding new product & another different email when we editing present product?

1 Answer 1


Try this,


Add your template here


            <my_custom_template module="module">
                <label>template name</label>



class YourNamespace_YourModule_Model_Observer
public function catalog_product_save_after($observer)
        $product = $observer->getProduct();
        // Your mail code
  • How to know new product action or edit product action
    – Vishal
    Commented Nov 18, 2016 at 5:22
  • Before send mail you need to check this product id it's available or not in Database
    – Magento 2
    Commented Nov 18, 2016 at 6:36
  • product id shows both action or do you know how check this condition code?
    – Vishal
    Commented Nov 18, 2016 at 6:48
  • simple if product id is available that's edit product else it's new product
    – Magento 2
    Commented Nov 18, 2016 at 6:53
  • First check this code you get mail or not after save product
    – Magento 2
    Commented Nov 18, 2016 at 6:55

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.