WordPress change author email notify message?

$comment_id can be passed as second parameter to your function.

Modify you add_filter:

add_filter('comment_notification_text', 'myfunction', 10, 2);

Then get $comment and $post from $comment_id:

function myfunction( $notify_message, $comment_id ) {
    $comment = get_comment( $comment_id );
    $post    = get_post($comment->comment_post_ID);

tech