Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[MOD] Mass Mail
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-03-02 14:02:43
mass-mail.php:

<?

// Mass Mail by TorrentialStorm (20/8/06@14:04)

// Last Updated: 15/04/08 @ 14:12

// Modified for v2: 2/03/08 @ 13:54

// DO NOT remove these comments.

// If you do edit this script, leave the original credits.



require("backend/functions.php");

dbconn(false);



loggedinonly();



if (!$CURUSER || $CURUSER["control_panel"]!="yes"){

show_error_msg("Error","Sorry you do not have the rights to access this page!",1);

}



if (!defined('PHP_EOL')) define ('PHP_EOL', strtoupper(substr(PHP_OS,0,3) == 'WIN') ? "\r\n" : "\n");



if ($_POST) {

set_time_limit(0);



$headers = "From: $site_config[SITEEMAIL]".PHP_EOL;

$headers .= "Return-Path: $site_config[SITEEMAIL]".PHP_EOL;

$headers .= "Content-type: text/plain; charset=ISO-8859-1; format=flowed".PHP_EOL;

$headers .= "X-Mailer: PHP".phpversion().PHP_EOL;



$classes = $_POST['classes'];

$subject = $site_config["SITENAME"]." - ".(get_magic_quotes_gpc()?stripslashes($_POST["subject"]):$_POST["subject"]);

$body = (get_magic_quotes_gpc()?stripslashes($_POST["body"]):$_POST["body"]);

$body .= "\n\n\n\nNote: this is a mass email and has been sent to ALL members.";



if (empty($subject) || empty($body)) show_error_msg("Error","Don't leave subject or body blank.<BR><BR><a href='?' onclick='history.back()'>Click here</a> to try again.");



if (count($classes) < 1) show_error_msg("Error","You MUST select a user class.<BR><BR><a href='?' onclick='history.back()'>Click here</a> to try again.");

$classes = implode(",", $classes);

$res = mysql_query("SELECT email FROM `users` WHERE status='confirmed' AND enabled='yes' AND class IN ($classes)") or die(mysql_error());

if (mysql_num_rows($res) == 0)

show_error_msg("Error", "No users found for that class.");

while ($row=mysql_fetch_array($res)) {

if (!mail("Multiple recipients <$site_config[SITEEMAIL]>", $subject, $body, $headers."Bcc: $row[email]".PHP_EOL))

show_error_msg("Failed", "Mail didn't get sent.");

}

show_error_msg("Success", "Mail sent");

die;

}



stdhead("Mass Email");

begin_frame("Mass Email","left");



$r = mysql_query("SELECT group_id, level FROM groups ORDER BY group_id ASC") or die(mysql_error());

$i = 0;

while($rr=mysql_fetch_row($r)) {

$i++;

$classboxes .= "<input type='checkbox' name='classes[]' value='$rr[0]'>".htmlspecialchars($rr[1])."&nbsp;&nbsp;";

if ($i % 3 == 0)

$classboxes .= "<BR>";

}



print <<<EOD

<form method="post" action="?">

<table width=600>

<tr>

<td align=right>Subject:</td><td><input type=text name=subject></td>

</tr>

<tr>

<td align=right valign=top>Body:</td><td><textarea cols=40 rows=10 name=body></textarea></td>

</tr>

<tr>

<td align=right valign=top>User classes to send to:</td><td>$classboxes</td>

</tr>

<tr>

<td colspan=2><center><input type="Submit" value="Send"/></center></td>

</tr>

</table>

</form>

EOD;

end_frame();

stdfoot();

?>
Unknown User
2010-04-06 01:15:54
thanks you
Unknown User
2010-04-07 14:37:27
thanks work
Unknown User
2010-04-14 14:49:24
Working 100 %

thx
Unknown User
2010-09-01 10:43:26
Admin cp

add

<td align="center"><a href=admincp.php?action=massmail><img src="images/admin/massmail.gif" border=0 width=32 height=32><br>Massen Email</a><BR></td>


and

if ($action == "massmail") {
if (get_user_class() < 9)

show_error_msg("STOP", "Zone r
Unknown User
2010-11-13 20:56:49
for me dont work. why??

say 'Mail sent' and dont send never
Unknown User
2011-04-13 05:00:12
if it doesn't send then there is an issue with ur smtp or e-mail setting, mine works fine using this code in my admincp.php

<td align="center"><a href=mass-mail.php><img src="images/admin/massmail.gif" border=0 width=32 height=32><br>Mass mail</a><BR></td>
Unknown User
2011-04-14 19:14:30
"jenny2009, post: 65203":
Admin cpadd

<td align="center"><a href=admincp.php?action=massmail><img src="images/admin/massmail.gif" border=0 width=32 height=32><br>Massen Email</a><BR></td>


and

if ($action == "massmail") {
if (get_user_class() < 9)

show_error_msg("STOP", "Zone r
Unknown User
2011-04-14 20:44:18
the 2nd part of your code didn't work for me so i just used what i posted and it works perfect
Unknown User
2011-09-25 07:11:34
"Stevo, post: 72088":
the 2nd part of your code didn't work for me so i just used what i posted and it works perfect

I think  u need  to change class

if ($action == "massmail") {

if (get_user_class() < 9)
Unknown User
2011-10-23 06:23:57
does it have to be port 25 or can it be like a gmail account? or another e-mail address, i should probably mention its a free hosting company im using.  Cjb.net
Unknown User
2011-11-01 08:16:00
when i sent mass mail i receive 2 mails every time

i have install the code in first post
Unknown User
2011-11-12 17:29:21
When i sent mail in greek all its ok except the title which is ....i dont know what language is this.

in description all its ok
Unknown User
2011-11-12 19:31:17
try changing the charset charset=ISO-8859-1;
Unknown User
2011-12-10 08:39:31
Hello

All mail is sent to the administrator, what is the reason
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728