Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Programming Help > PHP Programming Help

PHP Programming Help Post any question relating to PHP Programming here and hopefully someone can help.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2005-10-20, 03:41 AM
Junior Member
 
Join Date: Sep 2005
Posts: 10
vigour
Default

I'm trying to send a lot of emails from my PHP script. I'm using PHPmailer. I tried to send 1000 emails but only managed to send about 600 of them. So my question for the forum is:

How do I send lots of emails? Are there different methods? I do not want to send one email with 1000 email addresses. I want to send 1000 unique emails.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2005-10-20, 12:32 PM
Member
 
Join Date: Aug 2005
Location: Petoskey, MI
Posts: 83
n8dnx
Default

Sending lots of E-Mail from a PHP script is messy at best. One of the real problem is ensuring that the script keeps running as long as necessary to do the job. You can do that if you keep reseting the timeout for PHP and you have permission to do that, but there's still going to be a host of other problems.

The best thing to do is to build the E-Mail message and the list of recipients in PHP then hand the task of mailing off to something else--either a shell script or some kind of application that gets spawned off and detached from PHP in some way.
Reply With Quote
  #3 (permalink)  
Old 2005-10-20, 08:56 PM
Member
 
Join Date: Dec 2004
Posts: 62
nirus
Default

No, php can send out thousands of emails. I actually got fired from my last job for doing it on their servers. They happened to be an ISP that gives out free limmited webspace. Anyways my script sent out 8,000 emails. The recieving server started to bounce them back after about 3,000 and that ment 5,000 came bouncing back to my jobs server.

Anyways, here is what I used. My mailer uses a mail function and only emails one person $x amount of times.

It uses a random from address, random subject, random message, random message id.

If you realy want to use it as a spammer add in your own email headers that contain an IP address. That may throw an abuse department and you may not get blocked or warned. I used it to attack a company that stole $250 on ebay. Works nice but i do not condone it just because.

Code:
<?php
if(isset($_POST['submit'])){
    //Post To: Specific Settings
    $mailto = $_POST['mailto'];
    $messagenum = $_POST['messagenum'];
    $subject = $_POST['subject'];
    $message = $_POST['message'];
    $priority = $_POST['priority'];


    //Post From: Specific Settings
    $from = $_POST['from'];
    $replyto = $_POST['replyto'];
    $returnpath = $_POST['returnpath'];
    $organization = $_POST['organization'];
    $xsender = $_POST['xsender'];
    $xantiabuse = $_POST['xantiabuse'];
    $xmailer = $_POST['xmailer'];
    $xmimeole = $_POST['xmimeole'];
    $mailserver = $_POST['mailserver'];
    $datetime = $_POST['datetime'];



    Function mailer($mailto, $subject, $message, $priority, $from, $replyto, $returnpath, $organization, $xsender, $xantiabuse, $xmailer, $xmimeole, $mailserver, $datetime){
             srand ((double) microtime( )*10000);
             $ranum1 = rand(0,900);
             $ranum2 = rand(0,900);
             $ranum3 = rand(0,900);
             $alphabet = 'abcdefghijklmnopqrstuvwxyz';
             $ind1 = mt_rand(0, strlen($alphabet));
             $ind2 = mt_rand(0, strlen($alphabet));
             $ind3 = mt_rand(0, strlen($alphabet));
             $letter1 = $alphabet{$ind1};
             $letter2 = $alphabet{$ind2};
             $letter3 = $alphabet{$ind3};

/*Set from as rand*/   if ($fromran == "on"){
             $from = "{$letter1}{$letter2}{$letter3}{$ranum1}{$ranum2}@{$letter1}{$letter3}{$letter2}.com";
             }

/*Set subject as rand*/  if ($subjectran == "on"){
             srand ((double) microtime( )*10000);
             $ranum1 = rand(0,900);
             $ranum2 = rand(0,900);
             $ranum3 = rand(0,900);
             $alphabet = 'abcdefghijklmnopqrstuvwxyz';
             $ind1 = mt_rand(0, strlen($alphabet));
             $ind2 = mt_rand(0, strlen($alphabet));
             $ind3 = mt_rand(0, strlen($alphabet));
             $letter1 = $alphabet{$ind1};
             $letter2 = $alphabet{$ind2};
             $letter3 = $alphabet{$ind3};
             $subject = "{$ranum1}{$letter1}{$ranum2}{$letter2}{$ranum3}{$letter3}";
             }


/*Set custom headers*/  $headers .= "Received:from $from\r\n
                    ($mailserver)\r\n
                    with ESMTP id md5000000$ranum3$ranum1.msg\r\n
                    for <$mailto>; $datetime";
             $headers .= "Date: $datetime";
             $headers .= "To: $mailto\r\n";
             $headers .= "From: $from\r\n";
             $headers .= "Organization: $organization\r\n";
             $headers .= "Content-Transfer-encoding: 8bit\r\n";
             $headers .= "Reply-To: $replyto\r\n";
             $headers .= "Message-ID: <md5000000$ranum3$ranum1.msg>\r\n";
             $headers .= "Return-Path: $returnpath\r\n";
             $headers .= "X-Priority: $priority\r\n";
             $headers .= "X-MSmail-Priority: $priority\r\n";

             //Add headers for Hotmail and Yahoo mail (they do not like php mail)
             $headers .= "X-Mailer: $xmailer\r\n";
             $headers .= "X-MimeOLE: $xmimeole\r\n";
             $headers .= "X-Sender: $xsender\r\n";
             $headers .= "X-AntiAbuse: $xantiabuse\r\n";

             //send the mail
             //mail($mailto, $subject,"$message",$headers);
    }
//Run Mailer Function $messagenum times
$i = 0;
while ($i <= $messagenum){
mailer($mailto, $subject, $message, $priority, $from, $replyto, $returnpath, $organization, $xsender, $xantiabuse, $xmailer, $xmimeole, $mailserver, $datetime);
    $i++;
     }
}
else {
    $style = "<FONT style=\"font-size: xx-small;color: #000000;font-family: Verdana, Arial, Helvetica, sans-serif;\">";
    $style2 = "<FONT style=\"font-weight: bold;font-size: xx-small;color: #4C5A75;font-family: Verdana, Arial, Helvetica, sans-serif;\">";
    $input = "<input TYPE='radio'";
?>
    <html>
    <head></head>
    <body>
    <center><font color="#BBBBBB" Size="5"><b>Mass php Mailer</b></font></center>
    <table align="center" bgcolor="#EEEEEE" style="border:solid 2px #000000;" cellpadding="0" callspacing="0">
     <tr><td colspan="2"><center><b>To: Specific Settings</b></center></td></tr>
     <tr>
      <td align="right"><form method="post" name='setvalue' action="<?php echo $PHP_SELF ?>"><?php echo $style;?>Victim's Email Address:</font></td>
      <td><input name="mailto" STYLE="width:245px" value=""></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>Number of Emails: </font></td>
      <td><input name="messagenum" STYLE="width:40px" maxlength="4" value="200"></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>Subject: </font></td>
      <td><input name="subject" STYLE="width:245px" value=""></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>Message: </font></td>
      <td><textarea rows="3" cols="28" name="message"></textarea></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>Priority: </font></td>
      <td>
      <?php echo"$style2 Low</FONT>$input name='priority' value='Low'>
            $style2 Normal</FONT>$input name='priority' value='Normal' checked>
            $style2 High</FONT>$input name='priority' value='High'>"; ?>
      </td>
     </tr>
    </table>








    <br>
    <table align="center" bgcolor="#EEEEEE" style="border:solid 2px #000000;" cellpadding="0" callspacing="0">
     <tr><td colspan="2"><center><b>From: Specific Settings</b></center></td></tr>
     <tr>
      <td align="right"><?php echo $style;?>From: </font></td>
      <td><input name="from" STYLE="width:245px" value=""></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>Reply To: </font></td>
      <td><input name="replyto" STYLE="width:245px" value=""></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>Return Path: </font></td>
      <td><input name="returnpath" STYLE="width:245px" value=""></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>Your Organization: </font></td>
      <td><input name="organization" STYLE="width:245px" value=""></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>X-Sender: </font></td>
      <td><input name="xsender" STYLE="width:245px" value=""></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>X-AntiAbuse: </font></td>
      <td><input name="xantiabuse" STYLE="width:245px" value=""></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>X-Mailer: </font></td>
      <td><input name="xmailer" STYLE="width:245px" value="Microsoft Office Outlook, Build 11.0.5510"></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>X-MimeOLE: </font></td>
      <td><input name="xmimeole" STYLE="width:245px" value="Produced By Microsoft MimeOLE V6.00.2800.1441"></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>Your Mail Server: </font></td>
      <td><input name="mailserver" STYLE="width:245px" value="Exchange Server 2003"></td>
     </tr>
     <tr>
      <td align="right"><?php echo $style;?>Date/Time Zone: </font></td>
      <td><input name="datetime" STYLE="width:245px" value="Mon, 23 Feb 2005 00:47:22 -0100"></td>
     </tr>
    </table>
    <table align="center"><tr><td width="400"><br>
    <font color="RED" size="2">WARNING: </font><font color="#737373" size="2">This script is to be used for your
    own personal use. I am not responsible for anything generated or caused by this script. You yourself are the
    one who is clicking the send button, I just leagaly provided you with a script to show an example of what could
    be done. In most States it is illegal to run this script.
    <br><br>
    By clicking the Send to victim now button you are taking full responsibility for anything caused or generated by this script
    (in short this means that if you get into trouble, I am not responsible)<br>
     You will also be commiting most of the following actions:

           <ul type="square">
           <li> Sending a large number of email messages to a single address in order to flood someone's mailbox </li>
           <li> Forging email headers to obscure the true originator of the message </li>
           <li> Sending unsolicited mass mailings </li>
           <li> Creating pyramid schemes or chain letters </li>
           </ul>
          </font>
      </td></tr><tr>
      <td align="center" colspan="2"><small><small><br></small></small>
      <Button type="reset" name="reset" value="Reset">Reset</button>
      <Button type="submit" name="submit" value="Save">Send to victim now &rarr;</button><br><br>
      </form>
      </td></tr></table>
    </body>
    </html>
<?php
}
?>
Reply With Quote
  #4 (permalink)  
Old 2007-02-05, 05:42 PM
Junior Member
 
Join Date: Feb 2007
Posts: 1
MERK is on a distinguished road
Default $hlp !!!!!#

I need PHP inbox mailer.

i prefer those , that are web base. help me out, and where i can get fresh mai lists
Reply With Quote
  #5 (permalink)  
Old 2007-11-09, 12:27 PM
Junior Member
 
Join Date: Nov 2007
Posts: 1
shawncart is on a distinguished road
Default Hi php-editors, I need your urgent help

...As the head of IT department of my company (An Advertising Firm), we need to send out bulk mail for the promotion of our latest concepts.
I will need a PHP Bulk Mailer Script to setup this.
Thanks PHP-EDITORS.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:46 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.