![html send email code html send email code](https://images.template.net/wp-content/uploads/2017/06/cssgridsheet-788x414.jpg)
How to Copy User Permissions in SharePoint Online using PowerShell?.Microsoft Teams: How to Enable Guest User Access?.How to Copy Permissions from One Folder to Another in SharePoint Online using PowerShell?.How to Connect to Exchange Online using PowerShell?.SharePoint Online: How to Enable Global Navigation using App Bar?.SharePoint Online: Switch Navigation to Horizontal or Vertical.Hide a Button in SharePoint Online List or document library Toolbar.Switch between Document Libraries with Document Library Dropdown Menu in SharePoint Online and OneDrive.Just specify the -attachments parameter in Send-Mailmessage cmdlet. Send-MailMessage in PowerShell with attachments: Instead of directly embedding the HTML into the script, you can also store it in an external file and retrieve the HTML format/template with the Get-Content cmdlet in the script. Send-MailMessage -To $EmailTo -From $EmailFrom -Subject $EmailSubject -Body $EmailBody -BodyAsHtml -SmtpServer $SmtpServer $EmailBody= $EmailBody.Replace("VarReportDate",$ReportDate) $EmailBody= $EmailBody.Replace("VarRejected",$RejectedCount) $EmailBody= $EmailBody.Replace("VarApproved",$ApprovedCount) #Replace the Variables VarApproved, VarRejected and VarReportDate Number of requests Values for Approved & Rejected variables $EmailBody = Delete Script - Daily Report on VarReportDate $EmailSubject = "Site Delete Script - Daily Report on: "+$ReportDate $ReportDate = Get-Date -format "MM-dd-yyyy"