1. 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

Discussion in 'XenForo Questions and Support' started by kingjavo, Dec 15, 2015.

  1. kingjavo

    kingjavo Member

    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!
     
  2. kingjavo

    kingjavo Member

    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%;
    }
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

    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.
     
  4. Mike

    Mike XenForo Developer Staff Member

    I would note that EXTRA.css is not used in email templates, so you must have done something else to change the styling.
     
  5. kingjavo

    kingjavo Member

    Thanks for your help gentlemen. I'll take a look and see what I can find.
     
  6. kingjavo

    kingjavo Member

    Any chance you could point me to a guide or tutorial on how to mod an email template?
     
  7. kingjavo

    kingjavo Member

    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>
     
  8. Mike

    Mike XenForo Developer Staff Member

    The admin email system doesn't use any email templates. You would add the wrapping HTML you want to use directly.
     
  9. kingjavo

    kingjavo Member

    Is there an easy way to generate an email so I can see how it will look then?
     
  10. Mike

    Mike XenForo Developer Staff Member

    You have the option to send a test message on the next page (from when the mail is composed and the criteria is entered).
     
  11. kingjavo

    kingjavo Member

    That's what I tried and no dice...

    upload_2016-1-9_1-12-40.png
     
  12. kingjavo

    kingjavo Member

    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?
     
  13. kingjavo

    kingjavo Member

    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!
     
  14. Mike

    Mike XenForo Developer Staff Member

    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.
     

Share This Page