Jump to content

Hey,

 

I'm trying to configure exchange so it'll display a warning message when a user in my organization receives an email from someone outside the organization. It all works well, but I'm having a small issue. 

QxXRcZH.png

As you can see it applies the style to not just the disclaimer, but also the email content itself. How can I remove this?

 

This is the code I put in the disclaimer:

<html><style>
div {
    background-color: #FFE68A;
    border: 2px solid black;
}
</style>
<div><font color="red">Caution! </font>This is an email from outside the DDL organisation. <br>Do not open the attachment(s) unless you recognize the sender and know the content is safe to open.</div><br><br>
</html>

Configured it like this: 

EcCxCYq.png

CPU: AMD 3800X GPU: GTX 1080 Ti RAM: (16GB) 2x Corsair 8gb DDR4 3200Mhz Drives: SanDisk 240GB SSD, Samsung 500GB SSD, WD 1TB HDD

Motherboard: MSI X470 Gaming pro plus PSU: Gigabyte 650 watt Monitor(s): 27 inch AOC 1440p

Link to comment
https://linustechtips.com/topic/910733-microsoft-exchange-disclaimer/
Share on other sites

Link to post
Share on other sites

In HTML, just putting text somewhere won't do anything. You need to add a paragraph (I'm not a coder, just something I noticed) using the <p></p> tags within a body segment.

PC Specs - AMD Ryzen 7 5800X3D MSI B550M Mortar - 32GB Corsair Vengeance RGB DDR4-3600 @ CL16 - ASRock RX7800XT 660p 1TBGB & Crucial P5 1TB Fractal Define Mini C CM V750v2 - Windows 11 Pro

 

Link to post
Share on other sites

Fixed it. It was a coding issue. Gave the divbox a class and applies the style to that class only. It was applying the style to every div in the email. 

CPU: AMD 3800X GPU: GTX 1080 Ti RAM: (16GB) 2x Corsair 8gb DDR4 3200Mhz Drives: SanDisk 240GB SSD, Samsung 500GB SSD, WD 1TB HDD

Motherboard: MSI X470 Gaming pro plus PSU: Gigabyte 650 watt Monitor(s): 27 inch AOC 1440p

Link to post
Share on other sites

 

2 minutes ago, dionkoffie said:

Fixed it. It was a coding issue. Gave the divbox a class and applies the style to that class only. It was applying the style to every div in the email. 

I was just in the middle of writing it. Better practice would be to give an id to the div element, because it appears in the message only once. Also make the name of the class/id unique - HTML e-mails might use common element ids/classes like "warning", so try to use something like "warning-outsideDDL" or use inline styling on the div element and then you don't need the style element that affects the whole e-mail.

My heart belongs to AMD but that doesn't mean I furiously hate Intel or NVIDIA :)

 

MAIN RIG AMD Ryzen 7 1700 | ASRock Fatal1ty X370 Gaming-ITX/ac | MSI HD7950 OC 3GB | G.Skill Ripjaws V 2x8GB @ 2666MHz (Samsung D-Die) | ADATA SX8200 480GB NVMe SSD & Seagate Barracuda 120 1TB SSD & WD Black 500GB | Sharkoon QB One

 

LAPTOP Lenovo Yoga Slim 7 (14ARE05) - AMD Ryzen 5 4500U | AMD Vega 8 (Renoir) | 16GB RAM | SKHynix PC601 512GB (OEM) | 1080p 300nit non-touch display

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×