Send email on saving post type using hook

functions.php


add_action( 'save_post', 'my_project_updated_send_emails' );
function my_project_updated_send_emails(){
if( get_post_type() == 'birs_client' ){
wp_mail('ravi.loyalweb@gmail.com','subject ok 5','message ok 5');
}
}

Advertisements

Tagged: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: