<?php

/**
 * @var $sender_name
 * @var $sender_email
 * @var $message_text
 * @var $admin_link
 * @var $config
 */

$this->layout('system::mail/layouts/default', ['email_title' => __('New message from the contact form')]);
?>

<p>
    <?= __('A new message has been sent through the contact form on the <a href="%s">%s</a> website', $config['homeurl'], $config['copyright']) ?>
</p>
<p>
    <?= __('Sender:') ?> <b><?= $this->e($sender_name) ?></b><br>
    <?= __('E-mail:') ?> <b><?= $this->e($sender_email) ?></b>
</p>
<p><?= nl2br($this->e($message_text)) ?></p>
<?php
// Table-based button: mail clients strip background colors from <a>, and the layout stylesheet
// restyles bare links, so the background lives on the <td> and the link colors are forced inline.
?>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" align="center" style="margin: 32px auto 8px auto;">
    <tr>
        <td align="center" bgcolor="#66615b" style="background-color:#66615b;border-radius:4px;">
            <a href="<?= $this->e($admin_link) ?>"
               target="_blank"
               style="background-color:#66615b;border:1px solid #66615b;border-radius:4px;color:#ffffff !important;display:inline-block;font-family:sans-serif;font-size:16px;font-weight:bold;line-height:20px;padding:16px 32px;text-align:center;text-decoration:none !important;-webkit-text-size-adjust:none;">
                <?= __('Open in admin panel') ?>
            </a>
        </td>
    </tr>
</table>
