After publish node send email to someone Let's say i have a custom module in D7 , i want to add a feature to  this .  

the feature is : when a user publish a node send an email to someone . 

   function sending_email_node_update($node){
    if (isset($node-&gt;original-&gt;status) &amp;&amp; $node-&gt;original-&gt;status == 0 &amp;&amp; $node-&gt;status == 1){
        drupal_mail('sending_email','email_action','soheilsadeghbayan@yahoo.com',language_default());
  }
}

function sending_mail_mail($key, &amp;$message, $params) {
switch ($key){
    case 'sending_email_node_update':
        $message['subject'] = t('this is my action report');
        $message['body'][] = t('this is a reporting from sending email made by soheil') ;

        break;
}
}


Could you please help me how to do this ?
Why not just use Rules to do this. You'll have to watch a few tutorials to wrap your head around rules, but you won't have to re-invent the wheel or maintain any code.

If you need the custom module solution, check these out.

Check if node is being published: 
How can I detect when a node is changed from &#39;Published&#39; to &#39;Unpublished&#39;?

Then, use drupal_mail() to send your emails.