I'm writing a function to send mails after i publish a post on my site but the problem is the following:

If i edit a post that's already published sends a new mail everytime i update a published post. 

This is the function i wrote:

```
function send_mails($post_ID)  {
     global $wpdb;
     $post = get_post($post_ID);
     if ( !wp_is_post_revision( $post_ID ) ) {
         $contenido = $post->post_content;
         $excerpt = substr($contenido,0,255);
         $permalink = get_permalink($post_ID);
         $authorURL = get_author_posts_url($post->post_author);
         $title = $post->post_title;
                 $result = $wpdb->get_results("SELECT * FROM wp_subscribe", ARRAY_A);
         $origen = "XXXX";
         $headers = "From: $origen\r\n";
         $headers .= "X-Mailer: PHP5\n";
         $headers .= 'MIME-Version: 1.0' . "\n";
         $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
         foreach($result as $row){
               // A lot of code for styling the mail-..
         mail($row['email'],$title,$contenido,$headers);
         }
     }
     return $post_ID;
}
add_action( 'publish_post', 'send_mails' );

```

What can be wrong? Or maybe i missing some function to check if it's an edited post?

Thank you in advance