Send notification to the admin when new custom post is submitted

EDIT – SOLUTION

I got the solution using status ‘new_to_pending’ and adding the $auto object.

function newpost_notify( $auto ) {

  $mailadmin = '[email protected]';
  $subject="Subject";
  $headers="MIME-Version: 1.0" . "\r\n";
  $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";    
  $headers .= 'From: xxx <[email protected]>' . "\r\n";
  $message="There\"s a new post.';

  wp_mail( $mailadmin, $subject, $message, $headers );
}

add_action( 'new_to_pending', 'newpost_notify', 10, 2 );

thanks to the constructive comments of @Rarst & @flomei

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş