Skip to content

Commit ceac534

Browse files
committed
Update file: Mail notification password expiry.ps1
1 parent 9909ca8 commit ceac534

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts_staging/Backend/Mail notification password expiry.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ function Send-EmailReport {
290290
Write-Host "Les emails ne sont envoyés que le lundi. Arrêt de l'envoi."
291291
return
292292
}
293+
$signature = Get-EmailSignature
293294
$mailMessage = New-Object System.Net.Mail.MailMessage
294295
$mailMessage.From = $FromAddress
295296
foreach ($recipient in $Recipients) { $mailMessage.To.Add($recipient) }
@@ -320,6 +321,11 @@ function Send-UserNotification {
320321
[int]$Port = 25,
321322
[string]$FromAddress
322323
)
324+
$signature = Get-EmailSignature
325+
if ($Body -match '</body>') {
326+
} else {
327+
$bodyWithSignature = "$Body$signature"
328+
}
323329
$mailMessage = New-Object System.Net.Mail.MailMessage
324330
$mailMessage.From = $FromAddress
325331
$mailMessage.To.Add($Recipient)

0 commit comments

Comments
 (0)