title: Wordpress, wp_mail send twice
body: <p>i'm using this snippet to send email to users when their post deleted, it working but sending the same mail twice, any help please </p>
  
  <pre><code>function authorNotification($post_id) {
  global $wpdb;
  $post = get_post($post_id);
  $author = get_userdata($post-&gt;post_author);
  $message = "
  Hi ".$author-&gt;display_name.",
  We are sorry to inform you that your article, ".$post-&gt;post_title." has been declined. We strongly recommend you to go through the guest posting guidelines before you submit an article again.
  ";
  wp_mail($author-&gt;user_email, "Declined", $message);
  }
  add_action('delete_post', 'authorNotification');
  </code></pre>