Chances are it's another plugin interfering with it. Try turning off all your other plugins, and see if it works. If so, turn your other plugins back on one by one, making a test post again after each one, until it stops working.
Then look at the source code for the last plugin you turned on. Two things to check:
- Look for the
add_filter('publish_post',...) call. The second parameter is the routine that gets called when a post is published. Make sure that this routine returns the
$post_ID to the caller - there should be a line near the bottom which says
return $post_ID; If there's no such line, then add it immediately before the closing brace ( } ).
- Try altering the priority of the
add_filter) call - the email notification plugin is priority 5, so try altering the other plugin to be 4. If that doesn't work either, change it to 6.
It took me a while to figure this out - in my case the plugin that was interfering was the Viewlevel plugin.