The MU forums have moved to WordPress.org

Getting notified of new blog creation by email (43 posts)

  1. Ovidiu
    Member
    Posted 17 years ago #

    forgive my ignorance, but my wp-includes/wpmu-functions.php looks like this now:

    $message = $welcome_email;
            if( empty( $current_site->site_name ) )
                    $current_site->site_name = "WordPress MU";
            $subject = sprintf(__('New %1$s Blog: %2$s'), $current_site->site_name, $title);
            wp_mail($user->user_email, $subject, $message, $message_headers);
    //editstart to send email to admin after blog creation
            wp_mail( $admin_email, sprintf(__('[%s] New Blog Created'), $current_site->site_name), "New blog created by {$user->user_login}nnAddress: $urlnName: ".wp_specialchars( $title ) );
    //editend
    

    I inserted what is between //editstart and //editend shold I really append that @ there? Or am I looking at the completely wrong place?

  2. lunabyte
    Member
    Posted 17 years ago #

    That's what I did to mine, and it works just fine.

  3. Ovidiu
    Member
    Posted 17 years ago #

    any chance to get the IP from where the blog was created in the same mail? I jsut got 10 new splogs, all created in 2-3 minutes timespan, had to manually check them thought...

    If I would know they were created from the same IP I'd delete them immediately...

  4. drmike
    Member
    Posted 17 years ago #

    The IP address is saved within the wp_registration_log table.

  5. andrea_r
    Moderator
    Posted 16 years ago #

    I hate to dig up an old thread, but - :D

    I still had this problem after my recent upgrade to whatever version is on the dowload page. I applied the fix above. Still no email to admin.

    Caveats:
    - if I manually create a blog, I get an email (which is kind of a DUH).
    - all other system emails are sent out no problem, people can sign up fine
    - it *used* to work, but went away after an earlier upgrade

    Any ideas?

  6. drmike
    Member
    Posted 16 years ago #

    Strange as I'm still getting them.

  7. andrea_r
    Moderator
    Posted 16 years ago #

    Wait a second - what email addres does the notify come from? I know for certain the manually created ones come from the admin email account (or appear to). Just double-checking, as I have unrouted mail set to fail and I'm wondering if this is what's interfering.

  8. drmike
    Member
    Posted 16 years ago #

    Strange as mine has the from address as being from the address I'm getting them to and that's not hardcoded into the system anywhere else I don't think. It's not the support email address and it's not the email assigned to the first account.

  9. andrea_r
    Moderator
    Posted 16 years ago #

    Even weirder? I got one this morning. Not all detail were there, just

    "New blog created by 'usernam'Address: : "

    where username had the actual username. And that was it. I've had at least a dozen signups since I made that change. Although maybe the server was restarted in the middle of the night or something.

  10. adamrbrown
    Member
    Posted 16 years ago #

    Now available as a plugin.

    I was having the same issue--wanting to get notifications when people sign up. I found the old hack in this post. I thought how annoying it is to hack core files rather than use plugins.

    So I created the KB Notify Admin plugin. It implements this hack as a plugin. So when you upgrade WP-MU, you don't need to worry about preserving the hack.

    Plugin page: http://adambrown.info/b/widgets/category/kb-notify-admin/

    Just drop the plugin into your mu-plugins folder and you're done. That's it.

    Developed in WP-MU 1.2.2. Untested in earlier versions.

    This is the first plugin I've written for MU, though I've done a few for WP. I'm going to take a look around in a minute here to see if there is a plugins database similar to regular WP's. But if somebody wants to save me some time and just reply with that info, it would be great.

  11. andrea_r
    Moderator
    Posted 16 years ago #

    http://wpmudevorg.wordpress.com is pretty much where they land.

    I'm gonna try this out, because they don't get sent or sent sometimes, no matter what I've done.

  12. adamrbrown
    Member
    Posted 16 years ago #

    Oh yeah, I knew that once. I even registered there once. Thanks for the reminder.

    FYI, I don't know whether this will resolve those problems you were talking about in the last couple posts in this thread. Try and see, I guess.

  13. andrea_r
    Moderator
    Posted 16 years ago #

    Already installed and waiting. :) You're funny.

About this Topic