• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Lost Email Message after Upgrade

kingjavo

Active member
#1
I happened to lose my CSS styling for my email messages after upgrading to v1.5. I'm sure I made a backup of v1.4, but can't remember how to restyle my email template.

Anyone have any ideas to help!
 

kingjavo

Active member
#2
After some research, it appears my email styling was all added to the EXTRA.css file. For some reason the emails are still using the old default template styling. Any thoughts on what could be the issue?

Code:
.MedalCategory .categoryName {
        font-size: 18pt;
        display: none;
    }
   
.medals {
    text-align: center;
    padding-top: 10px;   
}

.medals a:link {
  text-align: center;
  display: inline-block;
  padding: 0px 4px;
}
   
.prefix.prefixCTA1 {
color: @textCtrlBackground;
background-color: white;
border-color: @primaryDark;
}
    a.prefixLink:hover .prefix.prefixCTA1 {
    color: red;
    background-color: yellow;
    border-color: blue;
    }

.prefix.prefixCTA2 {
color: @textCtrlBackground;
background-color: @primaryLightish;
border-color: @primaryMedium;
}
    a.prefixLink:hover .prefix.prefixCTA2 {
    color: black;
    background-color: white;
    border-color: red;
    }
#logo
{
    height: 220px;
}
<xen:if is="@enableResponsive">
@media (max-width:@maxResponsiveNarrowWidth)
{
    .Responsive .messageUserInfo .som
    {
        display: none;
    }
}
</xen:if>
.messageUserInfo .som
{
    padding-top: 7px;
    text-align: center;
}
.quickReply .messageUserInfo .som
{
    display: none;
}
.messageHeading
{
    background: #227ec1;
    background: linear-gradient(to bottom, #227ec1 0%,#1b649a 100%);
    background: -moz-linear-gradient(top, #227ec10%, #1b649a 100%);
    background: -ms-linear-gradient(top, #227ec1 0%,#1b649a 100%);
    background: -o-linear-gradient(top, #227ec1 0%,#1b649a 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#227ec1), color-stop(100%,#1b649a));
    background: -webkit-linear-gradient(top, #227ec1 0%,#1b649a 100%);
    border-radius: 3px;
    color: #FFF !important;
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#227ec1', endColorstr='#1b649a',GradientType=0 );
    font-size: 13px !important;
    font-weight: bold !important;
    khtml-border-radius: 3px;
    margin-bottom: 5px;
    moz-border-radius: 3px;
    overflow: hidden;
    padding: 9px 10px !important;
    webkit-border-radius: 3px;
}

.sidebar .avatarListInline li
{
overflow: hidden; zoom: 1;
float:left;
margin: 5px 0 0 0;
width:25%;
}
 

Brogan

XenForo moderator
Staff member
#3
Email templates are only available in debug mode so you would have to enable that in order to style them.

I believe there is a resource utilising email template modifications, which may be of use.
 

Mike

XenForo developer
Staff member
#4
I would note that EXTRA.css is not used in email templates, so you must have done something else to change the styling.
 

kingjavo

Active member
#7
I've update the MAIL_CONTAINER template and tried to send a test email as HTML, but the email is coming in as a plain white email with black font. Any idea why this is happening?

upload_2016-1-6_13-7-52.png

upload_2016-1-6_13-6-43.png

Code:
<html lang="{$emailLanguage.language_code}" dir="{$emailLanguage.text_direction}">
<head>
    <meta charset="UTF-8" />
    <base href="{$xenOptions.boardUrl}/" />
    <title style="color: #FFF;">{xen:raw $subject}</title>
</head>
<body dir="{$emailLanguage.text_direction}" text="#141414" bgcolor="rgb(31, 31, 31)" link="#176093" alink="#176093" vlink="#176093" style="padding: 10px">

    <table cellpadding="0" cellspacing="0" border="0" dir="LTR" style="background-color:#f0f7fc;border:1px solid #a5cae4;border-radius:5px;direction:LTR" dir="{$emailLanguage.text_direction}" >
    <tr>
        <td style="background-color:#227ec1;padding:5px 10px;border-bottom:1px solid #a5cae4;border-top-left-radius:4px;border-top-right-radius:4px;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:13px;font-weight:bold;line-height:1.231">
            <a href="{xen:link canonical:index}" style="color:#ffffff;text-decoration:none" target="_blank">{$xenOptions.boardTitle}</a>
        </td>
    </tr>
    <tr>
  <td style="background-color:#252525;padding:1em;color:#ffffff;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:13px;line-height:1.231">
                <img src="http://www.simheads.com/styles/fusiongamer/xenforo/logo.png" height="100px" alt="SimHeads: Sports Gaming Forums" class="CToWUd">    <p></p>           
            {xen:raw $bodyHtml}
        </td>
    </tr>
    <tr>
        <td style="background-color:#227ec1;padding:5px 10px;border-top:1px solid #d7edfc;border-bottom-left-radius:4px;border-bottom-right-radius:4px;text-align:right;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:13px;font-weight:bold;line-height:1.231">
            <a href="{xen:link canonical:index}" style="color:#ffffff;text-decoration:none" target="_blank">{xen:link canonical:index}</a>
        </td>
    </tr>
    </table>   

</body>
</html>
 

Mike

XenForo developer
Staff member
#8
The admin email system doesn't use any email templates. You would add the wrapping HTML you want to use directly.
 

Mike

XenForo developer
Staff member
#10
You have the option to send a test message on the next page (from when the mail is composed and the criteria is entered).
 

kingjavo

Active member
#12
The admin email system doesn't use any email templates. You would add the wrapping HTML you want to use directly.
Are you saying I can't see my template changes when using the Test Email option above without putting the HTML in the body manually?
 

kingjavo

Active member
#13
Nevermind, I just created a dummy user to test with, but it would still be nice to be able to do this in the Admin Tools! :) Thanks!
 

Mike

XenForo developer
Staff member
#14
I'm confused what the issue is. You enter the email subject/body (and other configuration you want) and click the "send test email" button. It will send it to your email address (as listed in the screenshot) so you can verify it displays how you want.