Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Outlook = New-Object -ComObject Outlook.Application
- $Mail = $Outlook.CreateItem()
- $Mail.Subject = "Test Email"
- $Mail.Body = "This is a test email sent from PowerShell."
- $Mail.Send()
- $Outlook.Quit()
- [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Outlook)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement