@renato_s that's right. Although, if you KNOW what globals are available at that time, you can access them...
unfortunately publish_post is hard to research, but your email function should be written with two parameters, like this (the name of the params doesn't exactly matter of course):
email_friends($post_ID, $post) {
...
}
where $post_ID is an integer and $post is your familiar $post object that accesses the fields directly.
See here: http://adambrown.info/p/wp_hooks/hook/$%7Bnew_status%7D_$post-%3Epost_type just follow the code link to see the actual WordPress code. That's the best way to learn WordPress!
Here's a full list of hooks and filters:
http://adambrown.info/p/wp_hooks
And to answer the older question "how do I pass a post id?" well if you know a specific one you probably don't need the hook. :-)
The hooks are for people who want their code to be called every time a particular event happens in WordPress. In the case of this function, the code indicates that the event is when a post's status changes from something else to "publish". The example is to mail a notification to people every time a post is published.
I hope that sheds some light on the mystery. This codex doc explains it in more detail: http://codex.wordpress.org/Plugin_API