Posted inTechnology / Mysql / Mysqli / php / Programming

PHP Send HTML Email Table Format Template

PHP Send HTML Email Table Format Template

Today, We want to share with you PHP Send HTML Email Table Format Template.
In this post we will show you PHP Send HTML Email with Table Format, hear for Send Beautiful HTML Email using PHP we will give you demo and example for implement.
In this post, we will learn about how to send email in php with html format with an example.

in this post will show you how to PHP Send HTML Email with Table Format example

require 'include/config.php';

$NewDate=Date('M j, Y', strtotime("+15 days"));
$sql = "SELECT * FROM mtto";
$result = $conn->query($sql);


$to = "[email protected]";
//$to = "[email protected]";
$subject = "Dreams pakainfo Notification";

$message ="Dear ".$to;
$message .= "


Dreams pakainfo PHP Get Email With Table


Dreams pakainfo

"; if ($result->num_rows > 0) { $results = array(); $i = 1; while($row = $result->fetch_assoc()) { if($NewDate==$row["fecha_1"] || $NewDate==$row["fecha_2"] || $NewDate==$row["fecha_3"]) { $results[] = $row; $message .=""; $message .=""; $message .=""; $message .=""; $message .=""; $message .=""; $message .=""; $message .=""; $message .=""; $message .=""; //sendemail($row["date"],$row["desrc"],$row["fechaini"],$row["peried"],$row["fecha_1"],$row["fecha_2"],$row["fecha_3"]); $i++; } } } else { echo "Not Find Records / 0 results"; } $message .="
Sr.No Date Descripción Fecha inicial Periodicidad F Control 1 F Control 2 F Control 3
".$i."". date("M j, Y", strtotime($row['date_time']))."".$row["descr"]."".date("M j, Y", strtotime($row['fecha_inicial']))."".$row["period"]."".$row["fecha_1"]."".$row["fecha_2"]."".$row["fecha_3"]."


kind Regards
Mtto,
Mantenimiento.
"; //print_r($results); //set headers with content-type HTML when sending HTML email in PHP $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // set More headers in PHP $headers .= 'From: ' . "\r\n"; $headers .= 'Cc: [email protected]' . "\r\n"; //send Mail Script mail($to,$subject,$message,$headers);

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

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

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype