The MU forums have moved to WordPress.org

How to resend activation email (23 posts)

  1. nims
    Member
    Posted 16 years ago #

    Hi,

    I recently installed a fresh copy of WPMU 1.2.3 and while testing I found activation emails were not delivered to few email IDs. I checked this forum and found many people having similar problems but there was no concrete solution available.
    Anyway, just wanted to know if there is any solution or plugin that can be used to resend the activation email and manage the inactive users from admin CP ?

  2. lunabyte
    Member
    Posted 16 years ago #

    At present, no there isn't.

    I'd suggest adding that to Trac though, as that is a pretty decent idea for improvement.

  3. nims
    Member
    Posted 16 years ago #

    Ok will do that. Can u post the link to do that.

  4. Bike
    Member
    Posted 16 years ago #

  5. nims
    Member
    Posted 16 years ago #

    Thanks. Done.

  6. quenting
    Member
    Posted 16 years ago #

    super quick and dirty :
    1) add "status" column to wp_signups defaulting to 0.
    2) Create this script:
    <?php
    $user = "xxx";
    $dbname = "yyy";
    $pass = "zzz";
    $host = "localhost";
    $co = mysql_connect($host, $user, $pass);
    if (!$co) {
    exit();
    }
    mysql_select_db($dbname);
    $today = date('Y-m-d');
    $sql = "SELECT * FROM wp_signups WHERE active=0 AND status=0 AND registered<=DATE_SUB('".$today."', INTERVAL 1 DAY)";
    $res = mysql_query($sql);

    $k=0;
    while($row=mysql_fetch_array($res)) {
    $k++;
    if($k%10==0) { sleep(2); }
    if($row['domain']!='') {
    $to = $row['user_email'];
    $subject = 'Your blog activation';
    $headers = "MIME-Version: 1.0\n" .
    "From: email@domain.com\n" .
    "Content-Type: text/plain; charset=\"ISO-8859-1\"\n";
    $body = "your blurb here - activation : http://". $row['domain']."/wp-activate.php?key=".$row['activation_key'];
    mail($to, $subject, $body, $headers, '-femail@domain.com');

    $sql1 = "UPDATE wp_signups SET status=1 WHERE domain='".$row['domain']."'";
    mysql_query($sql1);
    }
    }

    mysql_close($co);
    ?>

    3) Add it to crontab to run once a day.

    untested as is (just extracted some stuff from my own script), use at your own risk blablabla. If you want to make things clean, replace mysql functions with WP's abstraction layer etc. Didn't take the time to do it myself.

  7. nims
    Member
    Posted 16 years ago #

    Looks cool. I guess WPMU dev team would take a hint from this.

  8. wwRoni
    Member
    Posted 16 years ago #

    For a quick fix...

    I just peek at the DB sign up table. Look up the activation code and build the link myself.

    It works in a pinch when you just want to help one of your users out.

  9. nims
    Member
    Posted 16 years ago #

    Can someone point me to the code that sends out email when a user registers.

  10. nims
    Member
    Posted 16 years ago #

    Ok here is the error log message I got from my host

    2007-07-20 06:29:04 1IBrbU-0000wM-3l H=localhost (host15.hostmonster.com) [127.0.0.1] F=<ktplcom@host15.hostmonster.com> rejected after DATA: syntax error in 'From:' header when scanning for sender: missing or malformed local part in """ <>"

    Now can anyone help please :-)

  11. drmiketemp
    Member
    Posted 16 years ago #

    Note the empty double quotes and the <> marks. An email address is not being put in there.

    Open up a ticket, assign it a high priority, and give this link as an discussion of the issue.

    http://exim.dsmirror.nl/exim-html-4.40/doc/html/FAQ_0.html#TOC87

    I'd dig through the code myself for a fix but I don't feel right doing that anymore.

  12. andrewbillits
    Member
    Posted 16 years ago #

      I guess WPMU dev team would take a hint from this.

    Did I miss something? Is something broke on wpmudev?

    Thanks,
    Andrew

  13. drmiketemp
    Member
    Posted 16 years ago #

    Andrew, I think they mean Donncha and not you.

  14. lunabyte
    Member
    Posted 16 years ago #

    Yeah, that would be my guess since there is a space there.

  15. nims
    Member
    Posted 16 years ago #

    Pls do not hijack.

    This is regarding a common problem many people are facing and may be someone could help.

    Here is the error log message I got from my host, when a user tries to create an account (blog) and email is not sent. WPMU 1.2.3

    2007-07-20 06:29:04 1IBrbU-0000wM-3l H=localhost (host15.hostmonster.com) [127.0.0.1] F=<ktplcom@host15.hostmonster.com> rejected after DATA: syntax error in 'From:' header when scanning for sender: missing or malformed local part in """ <>"

  16. nims
    Member
    Posted 16 years ago #

    Ok I did few things here and there and its working now !!!
    I guess the following changes to php.ini file made it to work (or may be something else). But still in case anyone is facing similar problem, set these variables in your php.ini file.

    register_globals = Off
    display_errors = Off
    memory_limit = 32M

  17. lunabyte
    Member
    Posted 16 years ago #

    You mean they weren't already?

    Wow. That has to hurt.

  18. drmiketemp
    Member
    Posted 16 years ago #

    Just to throw in an idea here, I'd add something to the wp-signup.php page saying to folks that if they don't get an email within x amount of hours to send in an email to your support address from the email address they created the account with. Takes seconds for you to check the activation table to see if it's in there and another two seconds to create the blog.

    That and mention checking in their spam folders.

  19. nims
    Member
    Posted 16 years ago #

    I deleted the WPMU installation and database and did fresh install and now again its not working. I mean there is no activation email.
    The entries are there in database (signup table) pending activation.

    drmiketemp: "Takes seconds for you to check the activation table to see if it's in there and another two seconds to create the blog."

    You are right but if none of the user gets mail just imagine what would I be doing whole day (and night) everyday.

    I am trying to recreate the step that made it work. I would appreciate if someone could help.

  20. nims
    Member
    Posted 16 years ago #

  21. MazZziKa
    Member
    Posted 16 years ago #

    not fixed yet

  22. drmiketemp
    Member
    Posted 16 years ago #

    Did you apply the fix in 1020?

  23. apeatling
    Member
    Posted 16 years ago #

    Plugin to resend activation emails:
    http://mu.wordpress.org/forums/topic.php?id=5827

About this Topic