nhance-enrollment/app/Views/mail_template.php
2026-06-26 11:50:54 +05:30

137 lines
3.1 KiB
PHP

<?php
$value = "";
if(isset($params['notification_data'])){
$value = $params['notification_data'];
}
if(isset($params['notification'])){
$value = $params['notification'];
}
$value = json_decode($value['mail_content_json'] ?? '[]', true);
$contentWidth = (int) $value['body']['values']['contentWidth'] ?? 500;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Email Notification</title>
</head>
<style>
.mail-template-header {
max-width: <?=$contentWidth?>px;
background-color: #ffffff !important;
border-bottom: 1px solid #00999E;
width: 100%; /* default: allow full width */
}
/* On screens smaller than 600px → force 100% */
@media screen and (max-width: 600px) {
.mail-template-header {
background-color: #ffffff !important;
max-width: 100% !important;
width: 100% !important;
}
}
.mail-template-footer {
max-width: <?=$contentWidth?>px;
background-color: #ffffff !important;
border-top: 1px solid #00999E;
width: 100%; /* default: allow full width */
}
p{
margin:0 !important;
}
/* On screens smaller than 600px → force 100% */
@media screen and (max-width: 600px) {
.mail-template-footer {
background-color: #ffffff !important;
max-width: 100% !important;
width: 100% !important;
}
}
@media screen and (max-width: 600px){
.header-div{
width: 100% !important;
}
.footer-div{
width : 100% !important ;
}
}
.client_logo,
.nhance_logo
{
vertical-align: middle !important;
}
</style>
<body>
<!-- header -->
<div align="center" class="header-div">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mail-template-header">
<tr style="height:90px; background-color: #ffffff !important;">
<td align="left" class="client_logo" style="padding:5px;" width="50%">
<?php if (!empty($client_logo)): ?>
<img src="<?= esc($client_logo) ?>"
alt="Client Logo"
style="height:auto; max-width:160px; max-height:80px; display:block;">
<?php endif; ?>
</td>
<td align="right" class="nhance_logo" style="padding:5px;" width="50%">
<img src="<?= base_url('/public/assets/images/Nhance-Logo-Final.png'); ?>"
alt="Default Logo"
style="height:auto; max-width: 120px;">
</td>
</tr>
</table>
</div>
<!-- mail content -->
<?php
echo $mail_content ?? "";
?>
<!-- footer -->
<div align="center" class="footer-div">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mail-template-footer">
<tr style="background-color: #ffffff !important;">
<td align="center" valign="middle" style="padding-top:5px;">
<img src="<?= base_url('/public/assets/images/Nhance-Logo-Final.png'); ?>"
alt="Default Logo"
style="height:auto; max-width: 120px;padding-top:5px;">
<p>
&copy; <?= date('Y'); ?> Nhance India Insurance Broking Pvt Ltd
</p>
</td>
</tr>
</table>
</div>
</body>
</html>