How To Send Out Mass Emails With PHP Script

Share:

How To Send Out Mass Emails With PHP Script. One of the online campaign that used by internet marketers is to promote through email sent to their prospective customers. Through email marketing like this, prospective customers will get a variety of up to date information about the products directly. A lot of internet marketers who have successfully utilize email as a promotional media.
How To Send Out Mass Emails With PHP Script How To Send Out Mass Emails With PHP ScriptDo you know how to send out a mass email to some people ? Whether to send email one by one ? This of course is not possible, it would be a waste of time because that’s a lot of internet marketers who use php script for to send out a mass email. With a single send, the message will be directly sent to many destination email.

Download Now How To Send Out Mass Emails With PHP Script - How To Send Out Mass Emails With PHP Script

How To Send Out a Mass Email With PHP Script

So, how do I send out a mass email using php script ? Follow the tutorial below :

1. Create Send Out Mass Email Form

Our first step is to create a form that will be used to send out mass email and this form consists of email boxes destination, message subject and message body. This is following details the html script to create send out a mass email form.
Send-Out-Mass-Email-Form.html

<style type="text/css">
<!--
.style1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.style2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: bold;
}
-->
</style>
<form name="form1" method="post" action="Send-Out-Mass-Email-PHP-script.php">
  <div align="center">
    <p class="style2"> Email Massal Form </p>
    <table width="40%" border="0">
      <tr>
        <td width="37%" valign="top" class="style1">To </td>
        <td width="4%" valign="top" class="style1">:</td>
        <td width="59%" valign="top" class="style1"><label>
          <input name="email_list" type="text" id="email_list" size="25">
        </label></td>
      </tr>
      <tr>
        <td valign="top" class="style1"> Subject </td>
        <td valign="top" class="style1">:</td>
        <td valign="top" class="style1"><label>
          <input name="mail_subject" type="text" id="mail_subject" size="25">
        </label></td>
      </tr>
      <tr>
        <td valign="top" class="style1"> Message </td>
        <td valign="top" class="style1">:</td>
        <td valign="top" class="style1"><label>
          <textarea name="mail_body" cols="35" rows="5" id="mail_body"></textarea>
        </label></td>
      </tr>
      <tr>
        <td valign="top" class="style1">&nbsp;</td>
        <td valign="top" class="style1">&nbsp;</td>
        <td valign="top" class="style1"><label>
          <input name="sent" type="submit" id="sent" value="sent">
          <input type="reset" name="Submit2" value="cancel">
        </label></td>
      </tr>
    </table>
  </div>
</form>

To be able to send out a mass email, in email box destination, fill in your email address goals and separate them with commas (,).
Example:
email-1@email1.com,email-2@email2.com,email-3@email3.com, email-4@email4.com

2. Create PHP Script to Send Out a Mass Email

Php script that will be used to create mass email delivery is to use PHP mail() function and PHP explode function to separate email lists goals. More details, please learn how to create a php script to send mass email commands.
Send-Out-Mass-Email-PHP-script.php

<?php
$mail_subject=$_POST['mail_subject'];
$email_list=$_POST['email_list'];
$mail_body=$_POST['mail_body'];
$process=explode(",",$email_list);
reset($process);
foreach ($process as $to) {
$sent=mail($to,$mail_subject,$mail_body, "From: youremail@domain.com");
}
if ($sent) {
echo "<b> Email has been successfully sent </b><br><br>";
echo "<b> Message : </b><br>$mail_body";
} else {
echo "Email could not be sent, there may be errors in the e-mail address";
}
?>

Now you already know the php script to send a mass email, you can use it for various other purposes such as party invitations spread to your friends.
I hope this tutorial can be useful to you and thank you for reading How To Send Out Mass Emails With PHP Script

[Tutorial.World.Edu]

10 thoughts on “How To Send Out Mass Emails With PHP Script

    • Approximately, 24 December I was replying your contact but the email could not be sent to your email account that use outlook.com
      “………….@outlook.com”:
      SMTP error from remote server after MAIL command:

      This script may be able to help you, but it takes the server hosting that has a good performance to do so. This is the download link
      If there is a problem and need help, please call back

Leave a Reply

Your email address will not be published. Required fields are marked *