Tagged: send bulk email in php

Sending Bulk Emails in PHP with PHPMailer 0

Sending Bulk Emails in PHP with PHPMailer

Sending Bulk Emails in PHP with PHPMailer

In this Post We Will Explain About is Sending Bulk Emails in PHP with PHPMailer With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to php – Sending bulk mail using phpmailer Example

In this post we will show you Best way to implement php – How to Send Bulk Emails via Phpmailer, hear for how to send unlimited emails with free php mailer with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Include External Libs

 
<title>live24u | Send Bulk Email using PHPMailer with PHP Ajax</title>

<!-- Devloped by Pakainfo.com free download examples -->

<!-- Devloped by Pakainfo.com free download examples -->

 

index.js

$(document).ready(function(){
 $('.send_email').click(function(){
  $(this).attr('disabled', 'disabled');
  var id = $(this).attr("id");
  var data_action = $(this).data("data_action");
  var email_list_data = [];
  if(data_action == 'single')
  {
   email_list_data.push({
    email: $(this).data("email"),
    name: $(this).data("name")
   });
  }
  else
  {
   $('.single_student').each(function(){
    if($(this). prop("checked") == true)
    {
     email_list_data.push({
      email: $(this).data("email"),
      name: $(this).data('name')
     });
    }
   });
  }
  
  $.ajax({
   url:"send_mail.php",
   method:"POST",
   data:{email_list_data:email_list_data},
   beforeSend:function(){
    $('#'+id).html('Email Sending...');
    $('#'+id).addClass('live btn-danger');
   },
   success:function(data){
    if(data = 'ok')
    {
     $('#'+id).text('Good Luck Success');
     $('#'+id).removeClass('live btn-danger');
     $('#'+id).removeClass('live btn-primary');
     $('#'+id).addClass('live btn-success');
    }
    else
    {
     $('#'+id).text(data);
    }
    $('#'+id).attr('disabled', false);
   }
   
  });
 });
});

index.php

prepare($query);
$statement->execute();
$result = $statement->fetchAll();
?>



 
  <br />
  <div class="live container">
   <h3 align="center">Send Bulk Email using PHPMailer with PHP Ajax Example</h3>
   <hr />
   <div class="live table-responsive">
    <table class="live table">
     <tr>
      <th>Student Name</th>
      <th>Student Email</th>
      <th>Student Select</th>
      <th>Student Action</th>
     </tr>
     <?php
     $count = 0;
     foreach($result as $dataRow)
     {
      $count++;
      echo '
      <tr>
       <td>'.$dataRow["student_name"].'</td>
       <td>'.$dataRow["student_email"].'</td>
       <td>
        
       </td>
       <td><button type="button" name="send_email" class="btn btn-primary btn-xs send_email" id="'.$count.'">Send Single</button></td>
      </tr>
      ';
     }
     ?>
     <tr>
      <td colspan="3"></td>
      <td><button type="button" name="data_lots_email" class="live btn btn-primary send_email" id="data_lots_email">Send Email</button></td></td>
     </td>
    </table>
   </div>
  </div>
 

send_mail.php

IsSMTP();        //put PHP Mailer to send particuler comments using SMTP serever
  $sendMail->Host = 'smtpout.secureserver.net';  //put the SMTP serever some hosts set of your Email hosting any, this for like as a Godaddy
  $sendMail->Port = '80';        //put the default set SMTP server port
  $sendMail->SMTPAuth = true;       //put SMTP authentication. as well as Utilizes the phpmailer user Username and user Password variables
  $sendMail->Username = '[email protected]';     //put SMTP server username
  $sendMail->Password = '[email protected]#hrt$%';     //put SMTP server password
  $sendMail->SMTPSecure = '';       //put data connection prefix. Options like as are "", "ssl" as well as "tls"
  $sendMail->From = '[email protected]';   //put the From email user address for the comments
  $sendMail->FromName = 'live24u';     //put the HTML From name of the formname
  $sendMail->AddAddress($dataRow["email"], $dataRow["name"]); //simple add here a "To" address
  $sendMail->WordWrap = 50;       //put word wrapping on the html body of the comments to a given number of characters
  $sendMail->IsHTML(true);       //put comments type to HTML
  $sendMail->Subject = 'Live24u is the most popular Programming & Web Development blog.'; //put the Subject of the comments
  //An HTML all data or plain text send email comments body
  $sendMail->Body = '
  <p>Live24u is the most popular Programming & Web Development blog. Our mission is to provide the best online resources on programming and web development. We deliver the useful and best tutorials for web professionals — developers, programmers, freelancers and site owners. Any visitors of this site are free to browse our tutorials, live demos and download scripts.</p>
  <p>Our mission is to provide the best online resources on web development.
	We deliver the useful and best tutorials for web professionals — developers, programmers, freelancers and site owners.</p>';

  $sendMail->AltBody = '';

  $result = $sendMail->Send();      //Send an Email. and then Return true on data success or false on error generated

  if($result["code"] == '400')
  {
   $message_body .= html_entity_decode($result['full_error']);
  }

 }
 if($message_body == '')
 {
  echo 'ok';
 }
 else
 {
  echo $message_body;
 }
}

?>

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is Sending Bulk Emails in PHP with PHPMailer And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.