File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9191 Remove-Item $attachment - Force
9292 }
9393 }
94- # Remove temp deserialized attachments if used
94+ # Remove temp deserialized attachments if used
9595 if ($email.AttachmentsBinary ) {
9696 $null = remove-item - Path $tempAttachmentParentDir - Recurse - Force
9797 }
Original file line number Diff line number Diff line change 5050 # Add the attachments bytes to the mail object
5151 if (-not $script :mail [" AttachmentsBinary" ]) {
5252 $script :mail [" AttachmentsBinary" ] = @ ()
53- }
53+ }
5454 foreach ($attachment in $script :mail [' Attachments' ]) {
5555 $script :mail [' AttachmentsBinary' ] = @ ($script :mail [' AttachmentsBinary' ]) + @ {Name = (split-path - Path $attachment - Leaf); Data = [System.IO.File ]::ReadAllBytes($attachment )}
5656 }
Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ function Set-MDMail
2222 . PARAMETER Cc
2323 Additional addresses to keep in the information flow.
2424
25+ . PARAMETER Bcc
26+ Additional addresses to keep silently informed
27+
2528 . PARAMETER Subject
2629 The subject to send the email under.
2730
@@ -44,6 +47,9 @@ function Set-MDMail
4447 . PARAMETER NotBefore
4548 Do not send this email before this timestamp has come to pass.
4649
50+ . PARAMETER Priority
51+ The priority of the email
52+
4753 . EXAMPLE
4854 PS C:\> Set-MDMail -From 'script@contoso.com' -To 'support@contoso.com' -Subject 'Daily Update Report' -Body $body
4955
@@ -80,7 +86,7 @@ function Set-MDMail
8086 $RemoveAttachments ,
8187
8288 [datetime ]
83- $NotBefore ,
89+ $NotBefore ,
8490
8591 [MailPriority ]
8692 $Priority
You can’t perform that action at this time.
0 commit comments