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

Leave a Comment