<?php global $config; ?>

<?php if($showTemplate): ?>
	<div id="mail-wrapper" style="width:100%; background-color: #F5F5F5; padding: 20px 0 20px 0;">
		<div style="font-size: 12px; text-align: center; padding: 0 0 10px 0;"><?php echo vsprintf(_("Can't you correctly read this e-email? Try %sclicking here%s."), ['<a href="'.$config['settings']['email']['preview-link'].$mailID.'" target="_blank">', '</a>']); ?></div>
		<div id="mail-container" style="width: 600px; background-color: #FFF; border-radius: 5px; padding: 10px; margin: 0 auto; border:1px solid #eee;">
			<div id="mail-header" style="padding: 10px; border-bottom: 1px solid #eee;">
				<div id="mail-title">
					<h1 style="font-size: 20px; padding: 0; margin: 0; display: flex; align-items: center;"><img style="margin-right: 10px;" src="<?php echo $config['settings']['email']['logo-uri'], $mailID, '_', 'logo-email.png'; ?>" width="<?php echo $config['settings']['email']['logo-width']; ?>" alt="Logo"> <?php echo $config['settings']['app-title']; ?></h1>
				</div>
			</div>
			
			<div id="mail-body" style="padding: 10px 10px 10px 0; margin: 20px 0 20px 0;">
				<?php echo $body; ?>
			</div>
			
			<div id="mail-footer" style="text-align: center; font-size: 12px; color: #666; padding: 10px; border-top: 1px solid #eee;">
				<?php /*<div><a href="<?php echo $config['settings']['email']['footer-home-link']; ?>" target="_blank"><?php echo $config['settings']['app-title']; ?></a></div>*/ ?>
				<div>
					<?php echo $config['settings']['email']['footer-message']; ?>
				</div>
			</div>
		</div>
	</div>
<?php else: ?>
	<?php echo $body; ?>
<?php endif; ?>