Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 0.31 KB | Source Code | 0 0
  1. $Outlook = New-Object -ComObject Outlook.Application
  2. $Mail = $Outlook.CreateItem()
  3.  
  4. $Mail.To = "[email protected]"
  5. $Mail.Subject = "Test Email"
  6. $Mail.Body = "This is a test email sent from PowerShell."
  7. $Mail.Send()
  8.  
  9. $Outlook.Quit()
  10. [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Outlook)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement