Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Email template CSS code broken when sending through LS to Outlook 365 Desktop

  • Indispirit
  • Indispirit's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago - 4 years 2 months ago #192643 by Indispirit
Hi all

I'm having a problem where LS CSS code template emails such as invite and reminder is not rendering correctly when being received by MS Outlook 365 desktop client.





The CSS code is standard for emailing to 365 and is sourced from emailonacid. The code breaks after the #outlook tag
Code:
<style type="text/css">/* Client-specific Styles */
         #outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
         body{width:100% !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; margin:0; padding:0;}
         /* Prevent Webkit and Windows Mobile platforms from changing default font sizes, while not breaking desktop design. */
         .ExternalClass {width:100%;} /* Force Hotmail to display emails at full width */
         .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;} /* Force Hotmail to display normal line spacing.   */
         .backgroundTable {margin:0; padding:0; width:100% !important; line-height: 100% !important;}
         img {outline:none; text-decoration:none;border:none; -ms-interpolation-mode: bicubic;}
         a img {border:none;}
     a {color: #E63E31; text-decoration: none;}
         .image_fix {display:block;}
         p {margin: 20px 0px !important;}


I've done the following tests to confirm it's a LimeSurvey problem and just for Outlook Desktop
* Sent the same email through the same version of PHP mailer - (arrives without code break)
* Sent the same email to the follow clients: Thunderbird, Gmail, Yahoo, Mac OS, Outlook Web (arrives without codebreak)
* Issue is reported by multiple Outlook 365 receivers


Does anyone have any idea what could be causing this? I've read the code which resides in commonhelper.php, SendEmailMessage but can't see anything obvious.

Although this is just an issue for Outlook 365 desktop, a hell of a lot of folk use it, especially folk we're surveying in big organisations.
Last edit: 4 years 2 months ago by DenisChenu. Reason: remove link adn add code
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 months ago #192644 by DenisChenu
Add space to deactivate expression manager

{padding:0;} => { padding:0; }

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: Indispirit
The topic has been locked.
  • Indispirit
  • Indispirit's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago #192645 by Indispirit
Thanks Dennis, will try
The topic has been locked.
  • Indispirit
  • Indispirit's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago #192657 by Indispirit
Fixed, thanks Denis!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose