mass email tool

Started by john, December 01, 2011, 11:19:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Diablo999

Quote from: DragonCoder on June 06, 2016, 09:56:36 AM
post the 09 then please
Posted in 09 section. As already said by denede, then it's only the class checker and $installer09 which was neeeded to be edited.
https://u-232-forum.duckdns.org/index.php?topic=3744.new#new

denede

#12
my code uses OOP..it wont work on yours. i just said it works on my modified version
but i dont get it what is so hard?
from what i see the only thing you need to replace is the class checker if you dont have that setup for 09
the problem maybe is from you mail server. dedicated mail server.
do you have exim4 or sendmail installed on your server?
would be better to install postfix service and dovecot service
yeah..for sure you dont have a proper mail service installed and configured...

DragonCoder

Quote from: denede on June 05, 2016, 05:08:09 PM
dude, let him go.
i am using this on my 09 modified to the core version.. it's good :)
post the 09 then please

denede

dude, let him go.
i am using this on my 09 modified to the core version.. it's good :)

Diablo999

Quote from: DragonCoder on June 03, 2016, 08:35:47 PM
no not working on the 09

Did I promise anything about this?
Why do you think it's placed in V2 section?

denede

i already said it works, didn't ya !? ;)
cheers.:)

DragonCoder

#7
Quote from: denede on June 04, 2016, 08:58:15 AM
yes it is..you just dont know how to edit/convert it.
btw..how is that Tbdev 2016 going ? =]]
stop using different names..everyone knows who you are
yes i did convert it and still not working and i do not care who knows me and what nick i use bvlist and the Tbdev 2016 is done but bvlist not getting it so do not dig at me as you know this as been said in the forum about bitching and your a coder lol and do it but when some one bits back you all fucking hate

denede

yes it is..you just dont know how to edit/convert it.
btw..how is that Tbdev 2016 going ? =]]
stop using different names..everyone knows who you are

DragonCoder

Quote from: Diablo999 on May 29, 2016, 02:07:42 AM
This should work or report back and I'll do what I can to help.. remember to change userclass that you have on your site.

/admin/massmail.php
<?php

if ( ! defined'IN_TBDEV_ADMIN' ) )
{
        
$htmlout='';
        
$htmlout .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
                \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
                <html xmlns='http://www.w3.org/1999/xhtml'>
                <head>
                <title>Error!</title>
                </head>
                <body>
        <div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>
        </body></html>"
;
        print 
$htmlout;
        exit();
}

require_once 
"include/user_functions.php";

   
   
$lang array_merge($langload_language('ad_massmail') );

//==Class checker by pdq
require_once(INCL_DIR.'class_check.php');
class_check(UC_ADMINISTRATOR);        

if (
$_SERVER["REQUEST_METHOD"] == "POST"
{

        
$to '';

        switch(
$_POST['to']) {
        
        case 
'class_0'$to "FROM users WHERE class = '0' ";
                break;
        case 
'class_1'$to "FROM users WHERE class = '1' ";
                break;
        case 
'class_2'$to "FROM users WHERE class = '2' ";
                break;
        case 
'class_3'$to "FROM users WHERE class = '3' ";
                break;
        case 
'class_4'$to "FROM users WHERE class = '4' ";
                break;
        case 
'class_5'$to "FROM users WHERE class = '5' ";
                break;
        case 
'class_6'$to "FROM users WHERE class = '6' ";
                break;
        case 
'class_7'$to "FROM users WHERE class <= '3' ";
            break;
        case 
'dt'$to "FROM users WHERE last_login=$dt ";
                break;
        case 
'all'$to "FROM users ";
                break;
        }
// end switch

  
$subject $_POST['subject'];
  
$message $_POST['message'];


   
$x 1;
   
$hold 50// quantity of emails sent before 3 sec delay
   
$days 42;
   
$dt = (time() - ($days 86400));
   
   
$emails mysql_query("SELECT email $to ");

while (
$sendemail mysql_fetch_array($emails)) {
   
$email $sendemail["email"];
   
$success mail($email$subject,$message"{$lang['email_from']}{$INSTALLER09["site_name"]} {$INSTALLER09["site_email"]}");
   

   
$x++;
        if(
$x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout
        
sleep(3);
        
$x 0;
        }
// end of while loop

if ($success)
        
stderr("{$lang['email_success']}""{$lang['email_queued']}");
        else
        
stderr("{$lang['email_error']}""{$lang['email_failed']}");
        
        
 }
 
 
$HTMLOUT '';

$HTMLOUT .= "<form method='post' action='staffpanel.php?tool=massmail'>";
$HTMLOUT .= "
<table align='center'  width='700' border='0' cellpadding='0' cellspacing='0' class='main'>
<tr><td align='center' class='colhead'><b><h2>
{$lang['email_to']}</h2></b></td></tr>

<tr><td align='center' style='height:25px;'>
{$lang['email_send']}

<select name='to' size='1' style='background-color: #F7F7F7'>
<option value='all'> 
{$lang['email_all']} </option>
<option value='dt'> 
{$lang['email_inactive']}</option>
<option value='class_0'> 
{$lang['email_users']}  </option>
<option value='class_1'> 
{$lang['email_power_users']} </option>
<option value='class_2'> 
{$lang['email_vip']} </option>
<option value='class_3'> 
{$lang['email_fls']}  </option>
<option value='class_4'> 
{$lang['email_moderators']}  </option>
<option value='class_5'> 
{$lang['email_administrators']}  </option>
<option value='class_6'> 
{$lang['email_sys_op']}  </option>
<option value='class_7'> 
{$lang['email_below']}  </option>
</select></td></tr>

<tr><td align='center' style='height:25px;'>
{$lang['email_subject']}<input name='subject' type='text' maxlength='50' size='70' /></td></tr>

<tr><td align='center'>
{$lang['email_message']}<br /><textarea wrap name='message' rows='20' cols='145'></textarea></td></tr>
<tr><td align='center' style='height:35px;'><input type='submit' name='submit' value='SUBMIT' style='color:green;' /></td></tr>

</table></form>"
;

print 
stdhead("{$lang['email_mass']}"false) . $HTMLOUT stdfoot();

?>


/lang/en/lang_ad_massmail.php
<?php

$lang 
= array(


'email_mass'=>"Mass Mail",
'email_error' =>"Error",
'email_error2'=>"You have no rights to be here",
'email_to'=>"SEND GROUP-MAIL",
'email_from' => "From: ",
'email_send'=>"<b>Send message to:</b>",
'email_subject' =>"<b>Subject:</b>  ",
'email_message' =>"<b>Message:</b>",
'email_all'=>"All Users",
'email_inactive'=>"Inactiv Users (last login < 42 days)",
'email_users'=>"Users",
'email_power_users'=>"Power Users",
'email_vip'=>"Super VIP",
'email_fls'=>"FLS",
'email_moderators'=>"Moderators",
'email_administrators'=>"Administrators",
'email_sys_op'=>"Sysop",
'email_below'=>"All below Moderators",
'email_queued' => "E-mail successfully queued for delivery.",
'email_failed' => "The mail could not be sent. Please try again later.",
'email_success' => "Success",
);

?>


/staffpanel.php
'massmail'=>'massmail',

no not working on the 09

Diablo999

#4
This should work or report back and I'll do what I can to help.. remember to change userclass that you have on your site.

/admin/massmail.php
<?php

if ( ! defined'IN_TBDEV_ADMIN' ) )
{
        
$htmlout='';
        
$htmlout .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
                \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
                <html xmlns='http://www.w3.org/1999/xhtml'>
                <head>
                <title>Error!</title>
                </head>
                <body>
        <div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>
        </body></html>"
;
        print 
$htmlout;
        exit();
}

require_once 
"include/user_functions.php";

   
   
$lang array_merge($langload_language('ad_massmail') );

//==Class checker by pdq
require_once(INCL_DIR.'class_check.php');
class_check(UC_ADMINISTRATOR);        

if (
$_SERVER["REQUEST_METHOD"] == "POST"
{

        
$to '';

        switch(
$_POST['to']) {
        
        case 
'class_0'$to "FROM users WHERE class = '0' ";
                break;
        case 
'class_1'$to "FROM users WHERE class = '1' ";
                break;
        case 
'class_2'$to "FROM users WHERE class = '2' ";
                break;
        case 
'class_3'$to "FROM users WHERE class = '3' ";
                break;
        case 
'class_4'$to "FROM users WHERE class = '4' ";
                break;
        case 
'class_5'$to "FROM users WHERE class = '5' ";
                break;
        case 
'class_6'$to "FROM users WHERE class = '6' ";
                break;
        case 
'class_7'$to "FROM users WHERE class <= '3' ";
            break;
        case 
'dt'$to "FROM users WHERE last_login=$dt ";
                break;
        case 
'all'$to "FROM users ";
                break;
        }
// end switch

  
$subject $_POST['subject'];
  
$message $_POST['message'];


   
$x 1;
   
$hold 50// quantity of emails sent before 3 sec delay
   
$days 42;
   
$dt = (time() - ($days 86400));
   
   
$emails mysql_query("SELECT email $to ");

while (
$sendemail mysql_fetch_array($emails)) {
   
$email $sendemail["email"];
   
$success mail($email$subject,$message"{$lang['email_from']}{$INSTALLER09["site_name"]} {$INSTALLER09["site_email"]}");
   

   
$x++;
        if(
$x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout
        
sleep(3);
        
$x 0;
        }
// end of while loop

if ($success)
        
stderr("{$lang['email_success']}""{$lang['email_queued']}");
        else
        
stderr("{$lang['email_error']}""{$lang['email_failed']}");
        
        
 }
 
 
$HTMLOUT '';

$HTMLOUT .= "<form method='post' action='staffpanel.php?tool=massmail'>";
$HTMLOUT .= "
<table align='center'  width='700' border='0' cellpadding='0' cellspacing='0' class='main'>
<tr><td align='center' class='colhead'><b><h2>
{$lang['email_to']}</h2></b></td></tr>

<tr><td align='center' style='height:25px;'>
{$lang['email_send']}

<select name='to' size='1' style='background-color: #F7F7F7'>
<option value='all'> 
{$lang['email_all']} </option>
<option value='dt'> 
{$lang['email_inactive']}</option>
<option value='class_0'> 
{$lang['email_users']}  </option>
<option value='class_1'> 
{$lang['email_power_users']} </option>
<option value='class_2'> 
{$lang['email_vip']} </option>
<option value='class_3'> 
{$lang['email_fls']}  </option>
<option value='class_4'> 
{$lang['email_moderators']}  </option>
<option value='class_5'> 
{$lang['email_administrators']}  </option>
<option value='class_6'> 
{$lang['email_sys_op']}  </option>
<option value='class_7'> 
{$lang['email_below']}  </option>
</select></td></tr>

<tr><td align='center' style='height:25px;'>
{$lang['email_subject']}<input name='subject' type='text' maxlength='50' size='70' /></td></tr>

<tr><td align='center'>
{$lang['email_message']}<br /><textarea wrap name='message' rows='20' cols='145'></textarea></td></tr>
<tr><td align='center' style='height:35px;'><input type='submit' name='submit' value='SUBMIT' style='color:green;' /></td></tr>

</table></form>"
;

print 
stdhead("{$lang['email_mass']}"false) . $HTMLOUT stdfoot();

?>


/lang/en/lang_ad_massmail.php
<?php

$lang 
= array(


'email_mass'=>"Mass Mail",
'email_error' =>"Error",
'email_error2'=>"You have no rights to be here",
'email_to'=>"SEND GROUP-MAIL",
'email_from' => "From: ",
'email_send'=>"<b>Send message to:</b>",
'email_subject' =>"<b>Subject:</b>  ",
'email_message' =>"<b>Message:</b>",
'email_all'=>"All Users",
'email_inactive'=>"Inactiv Users (last login < 42 days)",
'email_users'=>"Users",
'email_power_users'=>"Power Users",
'email_vip'=>"Super VIP",
'email_fls'=>"FLS",
'email_moderators'=>"Moderators",
'email_administrators'=>"Administrators",
'email_sys_op'=>"Sysop",
'email_below'=>"All below Moderators",
'email_queued' => "E-mail successfully queued for delivery.",
'email_failed' => "The mail could not be sent. Please try again later.",
'email_success' => "Success",
);

?>


/staffpanel.php
'massmail'=>'massmail',

DragonCoder

Anyone have this tool please

autotron

#2
Did you look in V2 modifications?
https://u-232-forum.duckdns.org/index.php?topic=655.0

john

do we have a mass email tool for v2 as imv looked in the tools we do not have this tool many thax if u can give me this tool