I have the following php script:
<?php
require("../includes/config.php");
$_SESSION['id'] = 1;
$body = file_get_contents('../views/html/STANDARD_ADJ.html');
$body = str_replace('firstname' ,"Bob4567890" ,$body);
$body = str_replace('boat' ,"Arvora" ,$body);
$body = str_replace('start' ,"09:00AM" ,$body);
$body = str_replace('end' ,"09:00PM" ,$body);
$body = str_replace('ressailxcl' ,'RES TIME' ,$body);
$body = str_replace('datex' ,"Thursday May 23rd" ,$body);
$body = str_replace('colorx' ,"red" ,$body);
$body = str_replace('status' ,"OUT" ,$body);
$body = str_replace('skipemail' ,"[email protected]" ,$body);
$body = str_replace('skipphone' ,"617-943-5119" ,$body);
$body = str_replace('msg1' ,'Upcoming Reservation' ,$body);
$body = str_replace('msg2' ,"(wouldn't you rather be sailing?)",$body);
$body = str_replace('skipperx' ,"Bob rabc" ,$body);
$mailInputs = array("addAddress" => "[email protected]",
"subject" => "SwB:RESERVATION",
"body" => $body,
"usr" => 1);
$msg = mailerExpressBlueHostUpdated($mailInputs);
echo "Message Sent"
?>
Which works and STANDARD_ADJ.html is:
<!DOCTYPE html>
<html>
<head>
<style>
div{
font-size:5vw!important;
}
#img1{
width:100%!important;
}
</style>
</head>
<body lang=EN-US>
<div style="text-align:center;margin:0 auto;font-size:16px">
<img id="img1" style="width:70%;" src="cid:swb-image">
<div style="width:70vw;text-align:center">
<h3 style='display:block;padding-left:10px;margin-bottom:0;margin-top:0%;padding-top:0;text-align:left;width:70%'> Hi firstname, </h3>
</div>
<table style='text-align:left;margin:0 auto;width:100vw'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<col style='width:8.33%'>
<tr>
<td colspan="12" style='text-align:center'><h3 style='margin-top:8px;margin-bottom:0'> msg1</h3><h4 style='margin-bottom:8px;margin-top:0'>msg2 </h4></td>
</tr>
<tr>
<td colspan="3">DATE:</td>
<td colspan="9">datex</td>
</tr>
<tr>
<td colspan="3">SKIPPER:</td>
<td colspan="9">skipperx</td>
</tr>
<tr>
<td colspan="3">BOAT:</td>
<td colspan="9">boat</td>
</tr>
<tr>
<td colspan="3">STATUS:</td>
<td colspan="9" style='color:colorx'>status</td>
</tr>
<tr>
<td colspan="4"> </td>
<td colspan="4" style='text-align:center;'>Start</td>
<td colspan="4" style='text-align:center;'>END</td>
</tr>
<tr>
<td colspan="4">ressailxcl:</td>
<td colspan="4" style='font-weight:bold;text-align:center'>start</td>
<td colspan="4" style='font-weight:bold;text-align:center'>end</td>
</tr>
<tr>
<td colspan="12" style='text-align:center'><h5 style='margin-bottom:1%;'>Click on link to update your availability</h5></td>
</tr>
<tr>
<td colspan="3" style='text-align:left'><a style='text-decoration:none;' href='mailto:skipemail'><img src="cid:swb-email"> </a></td>
<td colspan="6" style='text-align:center'><a href='https://www.sailwbob.com/skipper'>SwB link</a></td>
<td colspan="3" style='text-align:right'><a style='text-decoration:none' href='tel:skipphone'><img src="cid:swb-phone"> </a></td>
</tr>
</table>
</div>
<div>
<!--skipmsg-->
</div>
</body>
</html>
In the HTML the line that has “Hi firstname” (see *********) is left justified to the very left of the page. How can I keep it left justified to line up with the left edge of the image?