Sample Email


//**********  Display a message on the Web page  ************
echo "<script>alert('Message Hasbeen sen to: ".$values['Name']."')</script>";

//********** Send email with new data ************
global $conn;
$strSQLSelect = "SELECT * FROM supplier WHERE id='".$values["id"]."'";
$rsSelect = db_query($strSQLSelect,$conn);
$data=db_fetch_array($rsSelect);
//********** Send email with new data ************
$timestamp = date( "d-m-Y H:m:s"); // Time Declaration
$email1=$data["Email"];
$from="no-reply@";
$msg="";
$subject="$msg".$values["Subject"]."";
$msg.="






<html lang=\"en\">
<head>
<title>Sharjah Cooperative Society</title>
</head>
<table bgcolor=\"#ffffff\" srole=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\" width=\"100%\" style=\"max-width: 600px; font-family: sans-serif; color: #0a0a0a; font-size: 12px; line-height: 140%;\">
<tbody>
<tr>
<td style=\"padding: 40px; font-family: sans-serif; font-size: 15px; line-height: 140%; color: #0a0a0a; text-align: center;\">
<div id=\"subhead\" class=\"mktoText\"><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh84l3Lo43REMrUw-La4KvfaZqx4ZXGkSquA2A7OQwXUGcBQDYtZluK33mEjvPfGCUyajIDcuTeWjXkvtcX7-9K3EDLcpGdwESPEXEHnPg34BjXyMK7n_nEme0i9RZGD1Ah3dhymXzpOks9/s1600/appointment.png\" /></div>
<div class=\"mktoText\" id=\"onecolbody\">
<p>
<table width=100% height=\"81\" border=1 cellpadding=2 cellspacing=0 bordercolor=#3399FF style=\"border:1px dashed #grey;\">
  <tr>
    <td width=\"30%\" valign=\"top\">Req No </td>
    <td width=\"70%\" valign=\"top\"><strong>".$values["ReqNo"]."</strong></td>
  </tr>
  <tr>
    <td valign=\"top\">Name:</td>

    <td valign=\"top\">".$values["Name"]."</td>
  </tr>
  <tr>
    <td valign=\"top\">Email: </td>

    <td valign=\"top\">".$values["Email"]."</td>
  </tr>
  <tr>
    <td valign=\"top\"> Subject: </td>
    <td valign=\"top\">".$values["Subject"]."</td>
  <tr>
    <td valign=\"top\">Optional: </td>
    <td valign=\"top\">".$values["Optional"]."</td>
  </tr>
  <tr>
    <td valign=\"top\">DateTime: </td>
    <td valign=\"top\">".date("m/d/Y",strtotime($values["DateTime"]))."</td>
  </tr>
    <td valign=\"top\">Time: </td>
    <td valign=\"top\">".date("h:i:sa",strtotime($values["Time"]))."</td>
  </tr>
</table>
</body></html>
";

$ret=runner_mail(array('to' => "" , 'subject' => $email1,'bcc' => $values["Email"], 'subject' => $subject, 'htmlbody' => $msg, 'from'=>$from));
if(!$ret["mailed"])
echo $ret["message"];






Comments