Highlighting text in emails depending on addressee

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Kevyn 2 weeks, 5 days ago.

  • Author
    Posts
  • #76264

    iain Barnetson
    Participant

    I've a PS script that is reporting on users connecting to servers and their isolation levels.
    The results are emailed in an html body with the information regarding each connection.
    I'd like to highlight each persons rows in the body. By that I mean that in the email I receive, my rows are highlighted, but in the email you receive your rows are highlighted, and in ABCs email, their rows are highlighted, etc, etc.
    So in the case of example below, dom\uid27 would receive the email with the row for "ABC-01\EBSITEST mybdb27" highlighted.
    Is that possible ? Anyone know and how to do it ?

    eg:

    Please see this wiki article for instructions on how to set isolation level: https://wiki.me.com/index.php/IT:DB:HowTo:Isolation_Level
    SqlServer	Database	spid	Login	HostComputer	ISOLATION_LEVEL	Program_Used_To_Connect	DateTime
    EFG-013\EBSITEST	mybdb1	95	DOM\uid85	ML-uid85	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:07
    EFG-019\EBSITEST	mybdb	1209	DOM\uid999	HL-uid999	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:13
    ABC-01\EBSITEST	mybdb	335	DOM\me	HL-me	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:13
    ABC-01\EBSITEST	mybdb27	841	DOM\uid27	HL-uid27	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:13
    ABC-01\EBSITEST	mybdb	223	DOM\uid56	HL-uid56	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:13
    ABC-05\EBSITEST	cstestkcc	314	DOM\uid56	HL-uid56	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:13
    ABC-01\xzy	mybdb	381	DOM\uid56	HL-uid56	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:13
    ABC-01\xzy	mybdb	83	DOM\uid34	HL-uid34	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:09
    ABC-99\xzy	mybdb	83	DOM\uid67	HL-uid67	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:10
    ABC-01\xzy	mybdb	83	DOM\uid99	HL-uid99	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:11
    ABC-01\xzy	mybdb	83	DOM\uid88	HL-uid88	ReadCommitted	Microsoft SQL Server Management Studio - Query	2017-07-31 11:30:12
    
    
  • #76300

    Kevyn
    Participant

    It looks like you can use the [mark] [/mark] tags (The tags use the less than and greater than, rather than the square brackets. This site doesn't seem to allow the less than/greater than combo to show up) to highlight html text. As an example, I put the following into a file and opened it. The text was highlighted in yellow. According to https://www.w3schools.com/TAgs/tag_mark.asp, the tag is new in HTML5.

    [mark]ABC-01\EBSITEST mybdb27 841 DOM\uid27 HL-uid27 ReadCommitted Microsoft SQL Server Management Studio – Query 2017-07-31 11:30:13[mark]

    Again, replace the square brackets with the less than & greater than symbols.

You must be logged in to reply to this topic.