Hello guys,the email() function in php could be very useful to send emails.If we could use php to create email address and then we can use email() function to send mails to others.
Okay,here I just write some code,if you needed,you can use them.
You can create a file let’s say email.php and save all the code within the file.
<?php header(”Content-Type:text/html;charset=utf-8″); ?>
<?php
$s = 1000;////////////////$s stand for how many emails you want to create,I set it as 1000.
for($i = 1;$i <= $s;$i++){
$qqemail9 = rand(1,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . “@qq.com”;
$qqemail8 = rand(1,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . “@qq.com”;
$num = rand(1,2);
if($num = 1){
$to = “{$qqemail9}”;
$subject = “this is the subject”; //////////////////sent “this is the subject” with your subject.
$message = “this is the content” . ” \r\n “; //////////////////sent “this is the content” with your content.
echo $i . ” ” . $to . “<br />”;
mail($to, $subject, $message, “FROM: sender@sender.com”);////////sender@sender.com is your own address,you can change it to your own email address.
}elseif($num =2){
$to = “{$qqemail8}”;
$subject = “this is the subject”; //////////////////sent “this is the subject” with your subject.
$message = “this is the content” . ” \r\n “;//////////////////sent “this is the content” with your content.
echo $i . $to . “<br />”;
mail($to, $subject, $message, “FROM: sender@sender.com”);////////sender@sender.com is your own address,you can change it to your own email address.
}
}
echo “You have sent” . $s . “emails”;
?>
Just upload the email file to your hosting and open the file you will have 1000 emails sent.
Leave a comment
You must be logged in to post a comment.