Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Send me an email
- Send-MailMessage `
- -From "name <emailaddress@domain.com>" `
- -To @("me <myemailaddress@domain.com>") `
- -Attachments $fi.FullName `
- -SmtpServer "10.10.10.10" `
- -Port 25 `
- -Subject "Subject" `
- -Body "PFA File: $($fi.Name)"
- ## Add more emails if desired, $fi is a file from get-item, can change it:
- $fn = "file path"
- if (Test-Path $fn){
- $fi = Get-Item $fn
Add Comment
Please, Sign In to add comment