Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Param($User,$File)
- $User="System_Mangler@familyenrichment.cc"
- $password = Get-Content "SystemMangler.txt" | ConvertTo-SecureString
- $credential = New-Object System.Management.Automation.PsCredential($user,$password)
- $From = "System_Mangler@familyenrichment.cc"
- $To = "ebosworth@familyenrichment.cc"
- $Attachment = "c:backuptoolstesting.csv"
- $Subject = "Mileage Date Ranges"
- $Body = "Here is a list of your employees and dates of previously submitted mileage sheets. When approving mileage sheets, Please check to make sure this is not a duplicate. `r`n Thank you `r`n The System Mangler"
- $SMTPServer = "smtp.gmail.com"
- $SMTPPort = "587"
- Send-MailMessage -From $From -to $To -Subject $Subject `
- -Body $Body -SmtpServer $SMTPServer -UseSsl -port $SMTPPort `
- -Credential $Credential -Attachments $Attachment
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement