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!.

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();
?>

 

Send Bulk Email using PHPMailer with PHP Ajax Example


<?php $count = 0; foreach($result as $dataRow) { $count++; echo ''; } ?>
Student Name Student Email Student Select Student Action
'.$dataRow["student_name"].' '.$dataRow["student_email"].'

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 = 'live24u@12258'; //put SMTP server username
$sendMail->Password = 'live!@#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 = '

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.

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.

';

$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.

Leave a Comment