Notification is showing unwanted information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 12:02 PM
Hi All,
we are seeing some issues when a notification is triggered and an email is sent out the users the body of the email contains CSS code that is likely used for styling an HTML email template. We are seeing the below code which generally includes styles for various elements such as body, table, images, paragraphs, and specific classes used for formatting
* START: RESET */ html, body { margin: 0 !important; padding: 0 !important; height: 100% !important; width: 100% !important; text-align:center;} body, table, span, p, div, ul, li {font-size : 16px !important; font-family: Tahoma, Arial, sans-serif !important;} img { display: block; width : 100%; } p { margin-block-start: 0; margin-block-end: 0; margin: 0 0 16px; } p:last-of-type, p.MsoNormal:last-of-type { margin-bottom: 0; } hr#event-table-hr, hr#footer-hr { border-top: 1px solid #A1A2A3; margin-top:0; margin-bottom:0; margin-block-start: 0 !important; margin-block-end:0 !important;} /* END: RESET */ /* START: HELPER CLASSES */ /* MISC */ .table { border: none; padding: 0; border-spacing: 0; border-collapse: collapse;} .width-full { width: 100%;} .content-center {margin: 0 auto;} .width-600 { width: 600px;} .height-full { height: 100%;} /* ALIGNMENT */ .align-top { vertical-align: top !important; } .align-left { text-align: left !important; } .align-right { text-align: right !important; } .align-center { text-align: center !important; } .align-middle { vertical-align: middle !important; } .align-bottom { vertical-align: bottom !important; } .align-center-top { text-align: center !important; vertical-align: top !important; } /* MARGINS */ .m-0 { margin : 0 !important; } .m-b-2 { margin : 0 0 2px 0 !important; } .m-b-4 { margin : 0 0 4px 0 !important; } .m-b-8 { margin : 0 0 8px 0 !important; } .m-b-12 { margin : 0 0 12px 0 !important; } .m-b-16 { margin : 0 0 16px 0 !important; } .m-b-24 { margin : 0 0 24px 0 !important; } /* PADDING */ .p-0 {padding:0;} .p-2 {padding:2px;} .p-4 {padding:4px;} .p-8 {padding:8px;} .p-12 {padding:12px;} .p-16 {padding:16px} .p-24 {padding:24px;} /* PADDING BOTTOM */ .p-b-2 { padding-bottom: 2px !important; } .p-b-4 { padding-bottom: 4px !important; } .p-b-8 { padding-bottom: 8px !important; } .p-b-12 { padding-bottom: 12px !important; } .p-b-16 { padding-bottom: 16px !important; } .p-b-20 { padding-bottom: 20px !important; } .p-b-24 { padding-bottom: 24px !important; } /* PADDING TOP */ .p-t-2 { padding-top: 2px !important; } .p-t-4 { padding-top: 4px !important; } .p-t-8 { padding-top: 8px !important; } .p-t-12 { padding-top: 12px !important; } .p-t-16 { padding-top: 16px !important; } .p-t-20 { padding-top: 20px !important; } .p-t-24 { padding-top: 24px !important; } /* PADDING LEFT */ .p-l-2 { padding-left: 2px !important; } .p-l-4 { padding-left: 4px !important; } .p-l-8 { padding-left: 8px !important; } .p-l-12 { padding-left: 12px !important; } .p-l-16 { padding-left: 16px !important; } .p-l-20 { padding-left: 20px !important; } .p-l-24 { padding-left: 24px !important; } /* PADDING RIGHT */ .p-r-2 { padding-right: 2px !important; } .p-r-4 { padding-right: 4px !important; } .p-r-8 { padding-right: 8px !important; } .p-r-12 { padding-right: 12px !important; } .p-r-16 { padding-right: 16px !important; } .p-r-20 { padding-right: 20px !important; } .p-r-24 { padding-right: 24px !important; } /* END: HELPER CLASSES */ /* START: LAYOUT */ #canvas, #canvas.MsoNormalTable { width: 100%; margin: 0 auto !important; height: 100%; border: none; padding: 0; border-spacing: 0; border-collapse: collapse; } #content, #content.MsoNormalTable { width: 600px; height: 100%; border: none; margin: 0 auto; padding: 0; max-width: 600px !important; border-spacing: 0; border-collapse: collapse; } #email-content-top {width:600px; padding: 24px 32px 12px;} #email-content-bottom {width:600px; padding: 12px 32px 24px;} /* END: LAYOUT */ /* START: PREHEADER */ .preheader-text { display:none !important; font-size:0 !important; color:transparent !important; line-height:0 !important; height:0 !important; width:0 !important; opacity:0 !important; overflow:hidden !important; mso-hide:all !important; font-family: sans-serif !important; } /* END: PREHEADER */ /* START: HEADER */ #email-masthead {border: none; padding: 0; border-spacing: 0; border-collapse: collapse; width:100%; max-width:600px !important; margin: 0 auto !important; } #email-banner { background-color:#3a73df; text-align:center;} #email-banner img {width:100%; height:auto;} #email-header-wrapper {background-color: #d1e1ff; padding: 16px 0;} #email-header { min-height : 96px; border: none; padding: 0; border-spacing: 0; border-collapse: collapse; width: 100%; margin: 0 auto; } .header-row-top { vertical-align: bottom; text-align: center; padding-top: 16px; padding-bottom: 4px; } .header-row-middle { padding-top: 4px; padding-bottom: 4px; text-align: center; vertical-align: top; color: #0e2d68; font-weight: 800; margin: 0 auto; font-size: 26px !important; line-height: 32px !important; } .header-row-bottom { text-align: center; padding-top: 4px; padding-bottom: 16px; font-size : 14px !important; } #header-label { margin:0 auto !important; text-align:center; min-width:80px; border-spacing:0; border-collapse:collapse; background-color: #0e2d68; color: #ffffff; border-radius: 2px; font-size: 14px !important; font-weight: 800; font-style: normal; } #header-label td{padding: 4px 8px !important;} /* START: EVENT TABLE */ #event-table-wrapper.MsoNormal { margin-bottom: 24px; } .event-table-header { text-align: left; } .event-table-header th p {font-size: 14px !important;} .table-header-item-first {padding: 5px 7px 3px 0;} .table-header-item {padding: 5px 7px 3px;} .table-header-item-first p, .table-header-item p {text-align:left;} .table-content-item-first { padding: 3px 7px 7px 0;vertical-align: top;} .table-content-item { padding: 3px 7px 7px; vertical-align: top;} #event-table {color: #2B2C2D; width: 100%; line-height: 1.4; border-collapse: collapse;} #event-table, #event-table th p { font-size: 14px !important;} #event-table.MsoNormalTable p.MsoNormal { margin: 0;} /* END: EVENT TABLE */ /* START: BODY */ #email-body { width: 100%; border: none; padding: 0; border-spacing: 0; border-collapse: collapse; } .details-label { font-weight: 800; margin-bottom: 8px !important; } p.details-inline-label { margin-bottom: 24px !important; } p.details-inline-label span { font-weight: 800 } .details-message { margin-bottom: 24px !important; } .details-message:last-child { margin-bottom: 0 !important; } .details-message p { margin-left: 24px; line-height: 24px; } /* END: BODY */ /* START: FOOTER */ #email-footer { background-color: #F6F7F7 !important; width: 100%; border: none; padding: 0;border-spacing: 0;border-collapse: collapse;} #footer-content {font-size: 14px !important; width: 100%; max-width:600px !important; border: none; padding: 0;border-spacing: 0;border-collapse: collapse;} .footer-content-row {width:600px; color: #6c6e6f; padding: 24px 30px 48px;} .footer-content-row table, .footer-content-row span, .footer-content-row p, .footer-content-row div, .footer-content-row ul, .footer-content-row li {font-size: 14px !important;} .footer-list-item {margin-bottom: 8px !important;} .details-list-item {margin-bottom: 8px !important;} #footer-list-wrapper {padding-bottom: 16px !important;} #footer-list {padding:0; margin:0 0 0 42px !important; } /* END: FOOTER */ /* START: MEDIA QUERIES */ @media screen and (max-width: 428px) { /* START: MOBILE RESET */ body, table, span, p, div, ul, li {font-size : 18px !important;font-family: Tahoma, sans-serif !important;} /* START: MOBILE RESET */ /* START: LAYOUT ON MOBILE */ #email-content-top { padding: 24px 24px 12px;} #email-content-bottom { padding: 12px 24px 24px;} /* END: LAYOUT ON MOBILE */ /* START: EVENT TABLE ON MOBILE */ #event-table, #event-table th p {font-size: 18px !important;} /* END: EVENT TABLE ON MOBILE */ #header-label, .header-row-bottom {font-size: 18px !important;} /* START: EVENT TABLE ON MOBILE */ #event-table,#event-table th p {font-size: 18px !important;} /* END: EVENT TABLE ON MOBILE */ /* START: BODY */ .details-message p { line-height: 32px; } /* END: BODY */ /* START: FOOTER */ #footer-content {font-size: 18px !important;} .footer-content-row table, .footer-content-row span, .footer-content-row p, .footer-content-row div, .footer-content-row ul, .footer-content-row li { font-size: 18px !important; } .footer-content-row { padding: 24px 16px 48px; } /* END: FOOTER */ }
Please let me know if this is a Servicenow issue ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 01:37 PM
Hi, without any details of the notification that is being triggered, or your configuration related to the notification trigger, it is not possible to evaluate the context of the string. is the notification OOB?, is this detail passed in as an event parameter or populated via a notification email script? Perhaps you could provide some clear details of your configuration and share xml file of the Notification (sysevent_email_action) record that's involved, Notification email scripts (if any) and triggering sysevent if the issue relates to content passed by a triggering sysevent, so that it can be assessed.