3 different mail notifications

Unless for some reason you need this to be hardcoded into your theme or have full control over your own plugin, you could use the existing Peter’s Collaboration Emails plugin.

If installing a plugin is not an option, I’d suggest modifying the above or borrowing some of its code, respectively. It can do all the things you require.

As an aside, it’s also easily adapted to work with just one or several custom post type(s).

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)