vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Administrative and Maintenance Tools - Auto Bounce Messages Management (https://vborg.vbsupport.ru/showthread.php?t=181936)

stwilson 07-16-2008 08:28 AM

Still not able to get this working. I have configured all the settings and have verified the bounced message has the appropriate string in it but the usergroup is not changed, even after the chron job is run manually.

Can anyone confirm this mod has worked for them?

mrahul 07-17-2008 08:32 AM

isn't it possible to track down all emails automatically if the email bounces more than thrice the system stops sending mails to the non-active mails ?

Alfa1 07-17-2008 03:12 PM

If a member is placed into the bounced usergroup and then updates his/her email address, will the member be placed back in his/her original usergroup?

djilou 07-23-2008 12:02 PM

Quote:

3)Another cron job runs once an hour, reads the bounced emails from the database and moves their owners to an usergroup which is determined by the admin from the settings.
4) Yet another cron job, will run once daily, to prune the records that haven't returned bounces in a settable period of time (30 days by default).
Why I don't see those cron jobs on the Scheduled Tasks ??
I see only : ABMM: Retrive Bounces
This Scheduled Task retrieves the bounced emails from the server every ten minutes.

Milad 07-24-2008 04:15 PM

Quote:

Originally Posted by djilou (Post 1582212)
Why I don't see those cron jobs on the Scheduled Tasks ??
I see only : ABMM: Retrive Bounces
This Scheduled Task retrieves the bounced emails from the server every ten minutes.

Two cron jobs run as plug-ins in other cron jobs.

djilou 07-24-2008 08:38 PM

Edit : never mind the cron job didn't work because of this

Quote:

Originally Posted by AngelBlue (Post 1566332)
I've added some code so that bouncing users now get:
* Popup PM notification set to YES
* Receive admin emails set to NO
* Recieve email PM notification set to NO
* Thread subscription mode set to "no email" (if it was previously set to instant, daily or weekly email)
* All their thread and forum subscriptions set to 'no email'.
* A PM to explain the above.

To do this, I replaced the code in your "Move Users To Bounce Usergroup" plugin with this:

Code:

$bounces = $vbulletin->db->query_read("
        SELECT messageid, toemail
        FROM " . TABLE_PREFIX . "sent_email
        WHERE bounced = 1
");

if ($vbulletin->db->num_rows($bounces) > 0)
{
        $toemails = array();
        $messageids = array();
       
        while ($bounce = $vbulletin->db->fetch_array($bounces))
        {
                $toemails[] = "'" . $bounce['toemail'] . "'";
                $messageids[] = $bounce['messageid'];
        }
        $toemails = array_unique($toemails);

        // start added code here... define data for PM data manager

        $tonames = array();
        $touids = array();
        $fromuser = fetch_userinfo(1);
        $message = "We tried to deliver an email to you, but unfortunately, it bounced. To prevent us sending more mail to you while your email provider is not accepting it, we have deactivated all the email-related features of your account. To reactivate your account, go to your UserCP, and update your email address. You will then get a confirmation email. Clicking on the link in this confirmation email should re-enable your account, at which point you will need to visit your UserCP options page to re-enable the email notifications you wish to use.";

        $affected = $vbulletin->db->query_read("SELECT userid,username FROM " . TABLE_PREFIX . "user WHERE email IN (" . implode(', ', $toemails) . ")");
        while ($affected = $vbulletin->db->fetch_array($affected)) {
                $tonames[] = $affected['username'];
                $touids[] = $affected['userid'];
        }
        $tonames = array_unique($tonames);
        $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_SILENT);
        $pmdm->set('fromuserid', '1');
        $pmdm->set('fromusername', 'EmailBot');
        $pmdm->set_info('reciept', false);
        $pmdm->set_info('savecopy', false);
        $pmdm->set('title', 'Email Broken!');
        $pmdm->set('message', $message);
        $pmdm->set_recipients(implode(";",$tonames), $fromuser['permissions']);
        $pmdm->set('dateline', TIMENOW);
        $pmdm->save();

       
       
        // this is stock mod code to move them to the different usergroup.
        $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET usergroupid = " .  $vbulletin->options['bm_usergroup'] . ", membergroupids = '', displaygroupid = 0 WHERE usergroupid NOT IN (" . $vbulletin->options['bm_excludeusergroups'] . ") AND email IN (" . implode(', ', $toemails) . ")");

        // and stock code to delete their message tracking info...
        $vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "sent_email WHERE messageid IN (" . implode(', ', $messageids) . ")");

        // continue custom code to update their user options...
        // stop them generating any more email!

        // pm popup = YES
        $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET pmpopup = 1 WHERE email IN (" . implode(', ', $toemails) . ")");
       
        // send notification email on PM - NO
        $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET options = (options - 4096) WHERE (options & 4096) AND email IN (" . implode(', ', $toemails) . ")");

        // admin email OFF
        $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET options = (options - 16) WHERE (options & 16) AND email IN (" . implode(', ', $toemails) . ")");

        // set autosubscribe = without email WHERE autosubscribe_with_email
        $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET autosubscribe = 1 WHERE (autosubscribe > 1) AND email IN (" . implode(', ', $toemails) . ")");

        // set emailupdates = 0 for their thread subscriptions
        $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "subscribethread SET emailupdate = 0 WHERE (emailupdate > 0) AND userid IN (" . implode(', ', $touids) . ")");

        // set emailupdates = 0 for their forum subscriptions
        $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "subscribeforum SET emailupdate = 0 WHERE (emailupdate > 0) AND userid IN (" . implode(', ', $touids) . ")");

        // finish
        unset($toemails, $messageids);
}

$vbulletin->db->free_result($bounces);



testebr 07-25-2008 07:53 PM

When will the final version be released?

scsa20 07-28-2008 06:51 AM

I'm trying to set this up and when I test the connection to the pop server, I get the following error message:

110 could not connect to the host "pop.gmail.com": Connection timed out

what am I possibly doing wrong?

psylenced 07-28-2008 07:37 AM

Can this mod read the message ID directly out of the email source?

If it can wouldn't it be easier to read this rather than creating an individual email address for each user or email sent.


Quote:

Originally Posted by scsa20 (Post 1585745)
I'm trying to set this up and when I test the connection to the pop server, I get the following error message:

110 could not connect to the host "pop.gmail.com": Connection timed out

what am I possibly doing wrong?

Have you enabled pop in your settings on gmail? Also if you read their help it might give you a different address - maybe you've typed it wrong..

scsa20 07-28-2008 09:19 PM

no, the pop is turned on, and it's the correct address it told me to use, and set the port to 995, still gives me the error.


All times are GMT. The time now is 01:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01254 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete