Hi Everyone,
I am have created a template in the autoresponder for a form to be send the clients completing the form. form looks fine in Kentico and displays correctly. However when I get the mail in outlook or gmail, the mail seem to have lost its formatting or rather styling.
I did look at the documentation, but it does not mention any additional step,for using custom styling.
Have anyone else experienced this? Is there a way to correct it?
Here is a html code used in the autoresponder.
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml">
<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="x-apple-disable-message-reformatting" />
<title></title>
<style type="text/css">html,
body {
margin: 0 auto !important;
padding: 0 !important;
height: 100% !important;
width: 100% !important;
background: #f1f1f1;
}
/* What it does: Stops email clients resizing small text. */
* {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
/* What it does: Centers email on Android 4.4 */
div[style*="margin: 16px 0"] {
margin: 0 !important;
}
/* What it does: Stops Outlook from adding extra spacing to tables. */
table,
td {
mso-table-lspace: 0pt !important;
mso-table-rspace: 0pt !important;
}
/* What it does: Fixes webkit padding issue. */
table {
border-spacing: 0 !important;
border-collapse: collapse !important;
table-layout: fixed !important;
margin: 0 auto !important;
}
/* What it does: Uses a better rendering method when resizing images in IE. */
img {
-ms-interpolation-mode: bicubic;
}
/* What it does: Prevents Windows 10 Mail from underlining links despite inline CSS. Styles for underlined links should be inline. */
a {
text-decoration: none;
}
/* What it does: A work-around for email clients meddling in triggered links. */
*[x-apple-data-detectors], /* iOS */
.unstyle-auto-detected-links *,
.aBn {
border-bottom: 0 !important;
cursor: default !important;
color: inherit !important;
text-decoration: none !important;
font-size: inherit !important;
font-family: inherit !important;
font-weight: inherit !important;
line-height: inherit !important;
}
/* What it does: Prevents Gmail from displaying a download button on large, non-linked images. */
.a6S {
display: none !important;
opacity: 0.01 !important;
}
/* What it does: Prevents Gmail from changing the text color in conversation threads. */
.im {
color: inherit !important;
}
/* If the above doesn't work, add a .g-img class to any image in question. */
img.g-img + div {
display: none !important;
}
/* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89 */
/* Create one of these media queries for each additional viewport size you'd like to fix */
/* iPhone 4, 4S, 5, 5S, 5C, and 5SE */
@media only screen and (min-device-width: 320px) and (max-device-width: 374px) {
u ~ div .email-container {
min-width: 320px !important;
}
}
/* iPhone 6, 6S, 7, 8, and X */
@media only screen and (min-device-width: 375px) and (max-device-width: 413px) {
u ~ div .email-container {
min-width: 375px !important;
}
}
/* iPhone 6+, 7+, and 8+ */
@media only screen and (min-device-width: 414px) {
u ~ div .email-container {
min-width: 414px !important;
}
}
</style>
<style type="text/css">.primary {
background: #448ef6;
}
.bg_white {
background: #ffffff;
}
.bg_light {
background: #fafafa;
}
.bg_black {
background: #000000;
}
.bg_dark {
background: rgba(0, 0, 0, .8);
}
.email-section {
padding: 2.5em;
}
/*BUTTON*/
.btn {
padding: 5px 15px;
display: inline-block;
}
.btn.btn-primary {
border-radius: 30px;
background: #448ef6;
color: #ffffff;
}
.btn.btn-white {
border-radius: 30px;
background: #ffffff;
color: #000000;
}
.btn.btn-white-outline {
border-radius: 30px;
background: transparent;
border: 1px solid #fff;
color: #fff;
}
h1, h2, h3, h4, h5, h6 {
font-family: sans-serif;
color: #000000;
margin-top: 0;
font-weight: 400;
}
body {
font-family: 'Work Sans', sans-serif;
font-weight: 400;
font-size: 15px;
line-height: 1.8;
color: rgba(0, 0, 0, .5);
}
a {
color: #448ef6;
}
table {
}
/*LOGO*/
.logo h1 {
margin: 0;
}
.logo h1 a {
color: #000000;
font-size: 20px;
font-weight: 700;
text-transform: uppercase;
font-family: 'Poppins', sans-serif;
}
.navigation {
padding: 0;
}
.navigation li {
list-style: none;
display: inline-block;;
margin-left: 5px;
font-size: 13px;
font-weight: 500;
}
.navigation li a {
color: rgba(0, 0, 0, .4);
}
/*HERO*/
.hero {
position: relative;
z-index: 0;
}
.hero .overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
content: '';
width: 100%;
background: #000000;
z-index: -1;
opacity: .3;
}
.hero .text {
color: rgba(255, 255, 255, .9);
}
.hero .text h2 {
color: #fff;
font-size: 50px;
margin-bottom: 0;
font-weight: 300;
line-height: 1;
}
.hero .text h2 span {
font-weight: 600;
color: #448ef6;
}
/*HEADING SECTION*/
.heading-section {
}
.heading-section h2 {
color: #000000;
font-size: 23px;
margin-top: 0;
line-height: 1.4;
font-weight: 400;
}
.heading-section .subheading {
margin-bottom: 20px !important;
display: inline-block;
font-size: 13px;
text-transform: uppercase;
letter-spacing: 2px;
color: rgba(0, 0, 0, .4);
position: relative;
}
.heading-section .subheading::after {
position: absolute;
left: 0;
right: 0;
bottom: -10px;
content: '';
width: 100%;
height: 2px;
background: #448ef6;
margin: 0 auto;
}
.heading-section-white {
color: rgba(255, 255, 255, .8);
}
.heading-section-white h2 {
font-family: line-height: 1;
padding-bottom: 0;
}
.heading-section-white h2 {
color: #ffffff;
}
.heading-section-white .subheading {
margin-bottom: 0;
display: inline-block;
font-size: 13px;
text-transform: uppercase;
letter-spacing: 2px;
color: rgba(255, 255, 255, .4);
}
/*BLOG*/
.text-services .meta {
text-transform: uppercase;
font-size: 14px;
margin-bottom: 0;
}
/*FOOTER*/
.footer {
color: rgba(255, 255, 255, .5);
}
.footer .heading {
color: #ffffff;
font-size: 20px;
}
.footer ul {
margin: 0;
padding: 0;
}
.footer ul li {
list-style: none;
margin-bottom: 10px;
}
.footer ul li a {
color: rgba(255, 255, 255, 1);
}
@media screen and (max-width: 500px) {
}
</style>
</head>
<body style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #222222;" width="100%">
<center style="width: 100%; background-color: #f1f1f1;">
<div class="email-container" style="max-width: 600px; margin: 0 auto;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="margin: auto;" width="100%">
<tbody>
<tr>
<td class="bg_white" style="padding: 0; background-color:#0093d6" valign="top"><!--<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="logo" style="text-align: center;">
<img src="{% CurrentSite.SitePresentationURL #%}/Content/img/email-header.jpg" style="width:100%;height:100%;">
</td>
</tr>
</table>
-->
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td class="logo" style="text-align: center;padding:25px 0"><!--<img src="https://www.test.com.au/Content/img/gosa.png">
<img src="https://www.test.com.au/Content/img/logo.png">--><a class="ir" href="https://www.sa.gov.au/"><img src="https://marketing.test.com.au/Content/img/gosa.png" /></a> <a class="ir" href="https://test.com.au"><img src="https://marketing.test.com.au/Content/img/logo.png" /></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="bg_white email-section">
<div class="heading-section" style="text-align: left; padding: 0 30px;">
<p>Dear $$label:FirstName$$,</p>
<h2>Thank you for your seminar registration.</h2>
<p>We can confirm that you are booked into the following seminar:</p>
<p><b>$$label:SeminarID$$</b><br />
<b>Date:</b> Tuesday, 4 February 2020<br />
<b>Time:</b> 6:30pm - 8:00pm<br />
<b>Venue:</b> Adelaide Pavilion - Veale Gardens</p>
<p>Registrations open from 6:00pm for a 6:30pm start.<br />
Light refreshments will be provided.</p>
<p>If you have provided us with your mobile phone number, you will be contacted with an SMS reminder prior to this event.</p>
<p>Kind regards,<br />
<b>test</b></p>
</div>
</td>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="margin: auto; color:white;" width="100%">
<tbody>
<tr>
<td class="bg_black footer email-section" style="background-color:#0093d6" valign="middle">
<table>
<tbody>
<tr>
<td valign="top" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td style="color:white;text-align:center;">
<ul class="social" style="width:240px;margin:0 auto;">
<li class="email" style="width:45px;float:left;"><a class="ir" href="mailto:enquiries@test.com.au"><img src="https://marketing.test.com.au/Content/img/icon-email.png" /></a></li>
<li class="facebook" style="width:45px;float:left"><a class="ir" href="http://www.facebook.com/test-company" target="_blank"><img src="https://marketing.test.com.au/Content/img/icon-facebook.png" /></a></li>
<li class="youtube" style="width:45px;float:left"><a class="ir" href="http://www.youtube.com/user/153test" target="_blank"><img src="https://marketing.test.com.au/Content/img//icon-youtube.png" /></a></li>
<li class="linkedin" style="width:45px;float:left"><a class="ir" href="https://www.linkedin.com/company/test-company" target="_blank"><img src="https://marketing.test.com.au/Content/img//icon-linkedin.png" /> </a></li>
<li class="pinterest" style="width:45px;float:left"><a class="ir" href="http://www.pinterest.com/153test/" target="_blank"><img src="https://marketing.test.com.au/Content/img//icon-pin.png" /></a></li>
</ul>
</td>
</tr>
<tr>
<td style="color:white;text-align:center;font-size:150%;"><span style="font-weight:bold;display:block;margin-bottom:-15px;">1300 636 878</span> <a href="test.com.au" style="color:white;">test.com.au</a></td>
</tr>
<tr>
<td style="text-align: center; color:white;font-size:75%">
<p><b>test company</b><br />
<a href="https://www.google.com/maps/place/169+Pirie+St,+Adelaide+SA+5000/@-34.9256704,138.6042071,17z/data=!3m1!4b1!4m5!3m4!1s0x6ab0ced19e873101:0xc5cd012ea9f6fb0e!8m2!3d-34.9256704!4d138.6063958" style="color: white;">Pirie Street, Adelaide SA 5000</a><br /></p>
<p> </p>
<p><a href="https://www.test.com.au/privacy" style="color:white;text-decoration:underline;">View privacy policy</a><br />
Copyright © test company | ABN | Australian credit license </p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td style="color:white;text-align:center; font-size:75%;">
<p>Want to change how you receive these emails? <a href="https://www.test.com.au/unsubscribe" style="color: white;">Unsubcribe from this list</a></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</center>
</body>
</html>
thanks for any advice,
Ivan