Send email messages after comment was submitted

For comment approved, you can review this question

Approve comment hook?

For comment submitted, you can hook into the comment_post hook, like

function show_message_function( $comment_ID, $comment_approved ) {
    if( 0 === $comment_approved ){
        //function logic goes here
    }
}
add_action( 'comment_post', 'show_message_function', 10, 2 );

Code copied from https://developer.wordpress.org/reference/hooks/comment_post/

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)