Wie zeigen Sie einen Kommentar in einer Mail an?

Daher möchte ich den Autor (per E-Mail) darüber informieren, dass sein Kommentar entfernt wurde und auf welchen Beitrag der Kommentar bezogen wurde.

// Mail author when their answer is deleted/trashed function authorANotification($comment_id) { $comment = get_comment($comment_id); $author = get_userdata($comment->user_id); $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n"; $headers .= "From: Fustions.com " . "\r\n"; $subject = "Your comment has been deleted"; $message = "
"; $message .= ""; $message .= ""; $message .= "
".$sitename."
"; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= "
Dear ".$author->display_name.",
Your comment: ".$comment->comment_text." - has been removed by an admin.
Read about why your comment might have been removed here: **********
Best regards,
Administration - Fustions.com
"; $message .= "
"; wp_mail($author->user_email, $subject, $message, $headers); } add_action('trash_comment', 'authorANotification');

Was mache ich falsch? Und wie zeige ich den Titel des betreffenden Posts an?

Vielen Dank!

Solutions Collecting From Web of "Wie zeigen Sie einen Kommentar in einer Mail an?"