Support » How-To and Troubleshooting » it is possible modify mail notification?

it is possible modify mail notification?

  • when a user put a new comment, my wordpress blog sends a mail notification.

    it is possible modify this mail notification?

    (i want put other text in last part of each mail notification)

Viewing 15 replies - 1 through 15 (of 18 total)
  • This plugin looks like it might do that:


    thanks for comments!
    i tell you more info about my problem.

    at the moment, i’m using “Subscribe to Comments” plugin (i like it a lot. it is a very good plugin: when an user puts a comment, he can choose if he wants also info about new comments for that post) and each mail notification has:
    – author
    – comment text
    – link to a post of my blog
    – link to subscription manager

    i simply want to put in mail notification also another field where i want simply put a signature (simply some words, not a long text).
    so i ask you if it is possibile this notification:
    using another plugin?
    or editing a file of wordpress?

    i don’t know very well english, please help me in easy english.
    thanks 🙂

    I’d see if that plugin comes close then modify that.

    MichaelH, i think that it is possibkle to edit “Subscribe to Comments” plugin and so each mail notification has also a ” final text for signature”.

    but how i can edit it?
    do you kwnow it?

    please, can help me?


    Assuming the plugin is http://wordpress.org/extend/plugins/subscribe-to-comments/ looks like you need to change the code around line 588 inside the function send_notifications().


    i read here
    and maybe also editing
    wp_notify_postauthor() in /wp-includes/pluggable.php
    is a solution.

    but maybe your solution is better because i use “Subscribe to Comments” plugin.
    i found
    function send_notifications() in /plugins/subscribe-to-comments.php file (plugin file).


    i’m using “Subscribe to Comments” plugin + italian translation
    so, i has 2 files:
    not only
    “subscribe-to-comments.php”, where you find function send_notifications()
    but also another file “subscribe-to-comments-it_IT.mo”

    i think i must edit “subscribe-to-comments-it_IT.mo” file.

    what do you think?

    Possible but I don’t believe you edit an .mo file. You will want to review Translating_WordPress.

    sorry for my later.

    i tried to edit function send_notifications() in /plugins/subscribe-to-comments.php file (plugin file), but i don’t undestand how i can put a new text signature (a signature always the same) in the final part of the notification mail

    here i copy the code:

    function send_notifications($cid) {
    global $wpdb;
    $cid = (int) $cid;
    $comment = $wpdb->get_row(“SELECT * FROM $wpdb->comments WHERE comment_ID=’$cid’ LIMIT 1”);
    $post = $wpdb->get_row(“SELECT * FROM $wpdb->posts WHERE ID=’$comment->comment_post_ID’ LIMIT 1”);

    if ($comment->comment_approved == ‘1’ && $comment->comment_type == ”) {
    // Comment has been approved and isn’t a trackback or a pingback, so we should send out notifications

    $message = sprintf(__(“There is a new comment on the post \”%s\””, ‘subscribe-to-comments’) . “. \n%s\n\n”, stripslashes($post->post_title), get_permalink($comment->comment_post_ID));
    $message .= sprintf(__(“Author: %s\n”, ‘subscribe-to-comments’), $comment->comment_author);
    $message .= __(“Comment:\n”, ‘subscribe-to-comments’) . stripslashes($comment->comment_content) . “\n\n”;
    $message .= __(“See all comments on this post here:\n”, ‘subscribe-to-comments’);
    $message .= get_permalink($comment->comment_post_ID) . “#comments\n\n”;
    //add link to manage comment notifications
    $message .= __(“To manage your subscriptions or to block all notifications from this site, click the link below:\n”, ‘subscribe-to-comments’);
    $message .= get_settings(‘siteurl’).”/wp-subscription-manager.php?email=[email]&key=[key]”;

    $subject = sprintf(__(‘New Comment On: %s’, ‘subscribe-to-comments’), stripslashes($post->post_title));

    how i must edit this code?

    I use:

    Which settings screen includes the emails to send.

    thanks Gangleri,

    but i prefer at the moment try to edit “Subscribe to Comments” plugin.

    i hope you can help me! 🙁

    please, can help me?


    Use FTP and copy your wordpress files from your host to your local computer then use http://wingrep.com and search the files for the existing text then that will tell you what file the existing text resides.


    but i know where there is the code!
    this is not a problem!
    i found the file!

    the problem is the i don’t know how i can edit the code to put a new text signature (a signature always the same) in the final part of the notification mail.

    i copied the code above.

    please can you help me?


    Just include another:

    $message .= __("\nThe signature I want to add\n", 'subscribe-to-comments');

    It won’t be localized (so you can use this too):

    $message .= ("\nThe signature I want to add\n");

    You must include it in the position you want it. Note that \n is a new line.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘it is possible modify mail notification?’ is closed to new replies.