0 votes

Hi smart people! I'm using this script:

http://www.adaxes.com/script-repository ... t-s423.htm

Which works great for sending an email to someone, listing their direct reports.

My issue is that I'd like to update the section below, to do some email formatting for the message, but my HTML is not strong. Can someone offer advice on forcing the email to have a specific font?

I've been trying to google some solutions but so far everything I've tried is no-go. Here's part of the original script, where it sets a variable ($reportFooter) for the body of the email:

$to = "%mail%" # TODO: modify me
$subject = "Direct Reports of %name%" # TODO: modify me
$reportHeader = "<h1><b>Direct Reports of %name%</b></h1><br/>"
$reportFooter = "<hr /><p><i>Please do not reply to this e-mail, it has been sent to you for notification purposes only.</i></p>"

Now - I've updated the $reportFooter using the <pre> tag to avoid having to manually <br> out every line break, etc.:

$reportFooter = "<hr /><p>Hello,</p><br>

This is a listing of the Direct Reports currently attributed to you.

Blah blah blah (rest of the message goes here)

Love always, the IDM Team

<br>
<br>
" # TODO: modify me

I've tried forcing a different font by using a couple of different permutations of the tag

<font face="verdana" color="green">This is some text!</font>

but the email still shows up with the default font.

Like I said, my HTML is pretty vague, so any advice on how to format the whole body of the email at once would be greatly appreciated!

Thanks for any and all replies!

by (150 points)

1 Answer

0 votes
by (270k points)
selected by
Best answer

Hello Jake,

There is no possibility to define the text font in the <pre> tag. For more details check the following article: http://www.cs.tut.fi/~jkorpela/HTML3.2/5.44.html.

As a solution you can use the <p> tag and define the text font in it. For information on how to use the tag, check the following article: https://www.w3schools.com/tags/tag_p.asp.

0

Got it - I suspected that the <pre> tag might be fighting with the other formatting; thanks for the guidance!

Related questions

0 votes
1 answer

We have the following script we need fixed to run within Adaxes to add true/false value to a customattribute for use in building dynamic distribution lists. $users = ... } else { Set-Mailbox -Identity $user.Name -CustomAttribute8 "Individual contributor" } }

asked Jul 13, 2022 by willy-wally (3.2k points)
0 votes
0 answers

Or would the DLs have to be manually created and rules set up? I'm starting to look into features of the product before demoing, and was hoping there was an easy answer on this one. Thanks

asked Oct 7, 2020 by SIRI-Steele (40 points)
0 votes
1 answer

Is there a way to generate a list of disabled accounts that have direct reports?

asked Oct 8, 2014 by Infounlim (470 points)
0 votes
1 answer

Ideally looking to make this a rule based group, but report or business unit should work also. In our domain, service accounts become direct reports of the user who requested/ ... if a specific object is a/not a direct report. Is this possible? Thank you

asked Nov 14, 2023 by ThompsonAlex (40 points)
0 votes
1 answer

Hi, Is there a way I can create a rule based group or scheduled task in which the Direct reports of the direct reports are added to a group? So for example: CEO VP's ... in the list that no longer reports to a manager who reports to the CEO. Thanks in advance

asked Dec 22, 2022 by gareth.aylward (180 points)
3,326 questions
3,026 answers
7,727 comments
544,678 users