I am working on a plugin that sent an email when a post is published using
add_action('save_post','my_function');
my_function($post_id)
{
//do everything here
}
its working fine whenever a new post is published or its being updated from quick edit,
but the problem is that its not working when a post is schedule for future publish, for this I googled it, and find the following
add_action('publish_future_post', 'my_function');
this is the same function as used for above action,
I also found following action on some results,
add_action('future_to_publish', 'my_function');
but the last 2 action not working , mean its not sending any email,
can anyone help me to figure it out ,