Jump to content
zbeng

Private Mailer !

Recommended Posts

Posted
<?php

function mass_mail ( $emails, $subject, $body )
{
if ( ini_get ( 'SAFE_MODE' ) )
{
set_time_limit (0);
};
$file['email'] = file ( $emails );
foreach ( $file['email'] as $eline => $email )
{
$mail = @mail ( trim ( $email ), $subject, $body, 'From: ' . trim ( $email ) );
$function = array ( 'status' => array ( 'failed' => '<font color=red>Failed</font>
',
'complete' => '<font color=green>Complete</font>
'
)
);
if ( !$mail )
{
print $eline . ') ' . $email . ' || ' . date ( 'h:i a' ) . ' || ' . $function['status']['failed'];
}
else
{
print $eline . ') ' . $email . ' || ' . date ( 'h:i a' ) . ' || ' . $function['status']['complete'];
};
ob_flush();
flush ();
};
};

mass_mail ( 'emails.txt', 'Hello...', 'Type in mesage what you whant send...' );

?>

Posted

o sugestie daca-mi permiti

E mai bine daca faci ca primul parametru sa fie un array

si

faci inainte sa apelezi

<?

$mailuri = file("mail.txt");

?>

Ptr ca in acest fel poti sa apelezi functia si daca iei un array de mailuri din baza de date, e mult mai flexibila;)

Posted
Deci e aproape identic cu ce iam dat yo lui Flame de ce oare :shock:

ce i'a dat el lu flame(FLAMA):

<?php 

/**
* @author RST
* @copyright 2007
*/

$to = $_GET['mail'];

$subject = $_GET['subiect']; //subiectu d00h

$message = $_GET['mesaj'];

$nr_mail = $_GET['nr_mailuri'];


$headers = 'From: '.$_GET['de_la'] . "\r\n" .
'Reply-To: '.$_GET['de_la'] . "\r\n" .
"MIME-Version: 1.0\n" .
"Content-type: text/html; charset=iso-8859-1" .
'X-Mailer: PHP/' . phpversion();
$i=0;
while ($i <= $nr_mail) {
mail($to, $subject, $message, $headers);
echo "done
";
$i++;
echo "mail no:";echo $i;
echo "
";}

?>

<title> POWERED BY RST </title> 

<p align="center">[b]Powered BY RST [/b]

<?


If ($action=="mysql"){

#Grab email addresses de MySQL

include "./mysql.info.php";

if (!$sqlhost || !$sqllogin || !$sqlpass || !$sqldb || !$sqlquery){

print "Porfavor configure su mysql.info.php en tu MySQL informacion. Todas las opciones requeridas.";

exit;

}

$db = mysql_connect($sqlhost, $sqllogin, $sqlpass) or die("Conexion en MySQL Fallida.");

mysql_select_db($sqldb, $db) or die("Seleecione su DataBase $sqldb");

$result = mysql_query($sqlquery) or die("Secion fallida: $sqlquery");

$numrows = mysql_num_rows($result);



for($x=0; $x<$numrows; $x++){

$result_row = mysql_fetch_row($result);

$oneemail = $result_row[0];

$emaillist .= $oneemail."\n";

}

}



if ($action=="send"){

$message = urlencode($message);

$message = ereg_replace("%5C%25", "%25", $message);

$message = urldecode($message);
$message = stripslashes($message);
$subject = stripslashes($subject);

}



?>

<form name="form1" method="post" action="" enctype="multipart/form-data">




<table width="100%" border="0">

<tr>

<td width="10%">

<div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Your

Mail:</font></div>

</td>

<td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">

<input type="text" name="from" value="<? print $from; ?>" size="30">

</font></td>

<td width="31%">

<div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Your

Name:</font></div>

</td>

<td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">

<input type="text" name="realname" value="<? print $realname; ?>" size="30">

</font></td>

</tr>

<tr>

<td width="10%">

<div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Repit:</font></div>

</td>

<td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">

<input type="text" name="replyto" value="<? print $replyto; ?>" size="30">

</font></td>

<td width="31%">

<div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Upload

Txt:</font></div>

</td>

<td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">

<input type="file" name="file" size="30">

</font></td>

</tr>

<tr>

<td width="10%">

<div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Subject:</font></div>

</td>

<td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">

<input type="text" name="subject" value="<? print $subject; ?>" size="90">

</font></td>

</tr>

<tr valign="top">

<td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">

<textarea name="message" cols="60" rows="10"><? print $message; ?></textarea>




<input type="radio" name="contenttype" value="plain">

Plain

<input type="radio" name="contenttype" value="html" checked>

HTML

<input type="hidden" name="action" value="send">

<input type="submit" value="Send Emails">

</font></td>

<td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">

<textarea name="emaillist" cols="30" rows="10"><? print $emaillist; ?></textarea>

</font></td>

</tr>

</table>

</form>



<?

if ($action=="send"){



if (!$from && !$subject && !$message && !$emaillist){

print "Porfavor complete todo lo necesario.";

exit;

}



$allemails = split("\n", $emaillist);

$numemails = count($allemails);



#Open the file attachment if any, and base64_encode it for email transport

If ($file_name){

@copy($file, "./$file_name") or die("El archivo que intestaste subir al servidor, no puede ser copiado");

$content = fread(fopen($file,"r"),filesize($file));

$content = chunk_split(base64_encode($content));

$uid = strtoupper(md5(uniqid(time())));

$name = basename($file);

}



for($x=0; $x<$numemails; $x++){

$to = $allemails[$x];

if ($to){

$to = ereg_replace(" ", "", $to);

$message = ereg_replace("&email&", $to, $message);

$subject = ereg_replace("&email&", $to, $subject);

print "====> $to.......";

flush();

$header = "From: $realname <$from>\r\nReply-To: $replyto\r\n";

$header .= "MIME-Version: 1.0\r\n";

If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n";

If ($file_name) $header .= "--$uid\r\n";

$header .= "Content-Type: text/$contenttype\r\n";

$header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";

$header .= "$message\r\n";

If ($file_name) $header .= "--$uid\r\n";

If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n";

If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n";

If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n";

If ($file_name) $header .= "$content\r\n";

If ($file_name) $header .= "--$uid--";

mail($to, $subject, "", $header);

print "Good..Inbox:)
";

flush();

}

}



}

?>
<p align="center">[b]Powered BY RST [/b]</p>

primul prost codat al doilea furat 99.9% ... nush cum se aseamana dar in fine ... cat despre asta ... bleah slab

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...