One may think that this is a great script for flooding someone with spam but this script is actually very useful when you need to stress test a new mail server. It is important to have the ability to fill mail boxes with emails that have random subjects, names and "from" so that you can test the sorting options of the mail box. Sorting is usually a heavy task on the mail server (in exchange for example) and if you fill a mail box with thousands of random emails you cause the mail server to work hard on sorting.
<?
$OneKBText = "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 " ;
$Recipient = "user@domain.com" ;
$MailSize = "1" ; //in KB
$NumberOfEmails = 1 ;
//Build Mail Body
For( $i = 1 ; $i <= $MailSize ; $i ++) {
$Text .= $OneKBText ;
}
For( $i = 1 ; $i <= $NumberOfEmails ; $i ++) {
$Title = md5 ( uniqid ( rand ()));
$FirstName = substr ( $Title , 1 , 5 );
$LastName = substr ( $Title , 6 , 5 );
$Domain = substr ( $Title , 20 , 7 );
$User = substr ( $Title , 12 , 5 );
mail ( " $Recipient " , " $Title " , " $Text " , "From: $FirstName $LastName < $User @ $Domain .com>" );
Echo "Sending Mail Number $i <BR>" ;
flush ();
}
Echo "<BR><BR><BR>*** Done sending mail ***<BR>" ;
?>
An email validation script that actually checks against the recipient's mail server. Categories : Email , Complete Programs , PHP , Network , Debugging Example of function to send out email if error occurs Categories : PHP , Email , Debugging , Errors and Logging Email attachment code Categories : PHP , Email , Filesystem A Custom Error Handling And Debugging Class Categories : PHP , PHP Classes , Debugging , Errors and Logging phpEasyMail: An easy way to send data from HTML-forms via EMail. Categories : Email , HTML and PHP , Complete Programs , PHP PhpView 0.1 - simple php viewer, using temporary files and frames.
Categories : PHP , PHP Options and Info , Debugging , HTML and PHP PHP based Contact email form with multiple recipients, text file based, supports departments. Categories : PHP , Email , Beginner Guides , Filesystem Alert in JavaScript and Trace in Flash Action script are two commands that I find very much useful for tracking and debugging errors in my scripts. Unfortunately, there is no such option in PHP. Categories : PHP , Java Script , Debugging PHPRecommend v1.0 - Recommend this page to a friend script written in PHP. Easy to install Categories : PHP , URLs , Complete Programs , Email , Site Planning imap_sort Categories : IMAP , Email , PHP , PHP Functions simple script to send emails via a html-form to different users Categories : Email , MySQL , PHP , Databases Print structured array with offsets Categories : PHP , Debugging , Arrays Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP , PHP , HTML , PDF , Excel A time measuring and performance benchmarking class Categories : PHP , PHP Classes , Testing , Debugging , Date Time PHP port of Matt Wrights FormMail.pl WWW form to e-mail gateway. Categories : Email , Complete Programs , Environment Variables , PHP
Sanjoy Roy wrote : 1291
I could not send mail using your code. I have changed the Recipient email address to ensure it is going to my a/c but it is not doing anying. I hope it did not worked.
Hope to get your feedback soon.
Boaz Yahav wrote : 1292
I have noticed that some Anti Spam systems block these mails. are you using some kind of Anti Spam service?
Try to send to a Gmail address, even if it`s taken as spam, you will see it in the spam folder.
This code works for me.