<?php
include("../../check.php");
 if(isset($_POST['id'])){
$id=$_POST['id'];
$getall = $getData->runQuery("SELECT * FROM `master` where id='$id'");
$email = $getall[0]['email'];
$to = $email;
$subject = "umeedeinfoundation.org testing";

$message = "
<html>
<head>
<title>umeedeinfoundation.org</title>
</head>
<body>
<table style='border:1px solid black'>
<tr style='border:1px solid black'><td colspan='2' style='border:1px solid black'>Dear sir</td></tr>
<tr style='border:1px solid black'>
<td style='border:1px solid black'>Please note your password</td>
<td style='border:1px solid black'>".$getall[0]['show_pass']."</td>
</tr>
<tr style='border:1px solid black'>
<td style='border:1px solid black'>The link is </td>
<td style='border:1px solid black'><a href='https://www.umeedeinfoundation.org/c_panel/welcome'>Click here</a></td>
</tr>
<tr><td colspan='2'>Thanks Regards</td></tr>
</table>
</body>
</html>
";

// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

// More headers
$headers .= 'From: <webmaster@example.com>' . "\r\n";

mail($to,$subject,$message,$headers);
echo "<span class='text-success'>Email sent succefully</span>";
}else{
    echo "<span class='text-dnager'>Email sending failed</span>";
}
?>