Notify WordPress users of newly published post

So you have a post section and each time you publish a new custom post you’d like to notify all your users (subscriber). It could be a post, a product, an event or perhaps a tutorial etc. Usually the action hook would be ‘publish_post’ or ‘publish_page’ but those hooks only work for Posts and Pages. […]