Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. Param($User,$File)
  2. $User="System_Mangler@familyenrichment.cc"
  3. $password = Get-Content "SystemMangler.txt" | ConvertTo-SecureString
  4. $credential = New-Object System.Management.Automation.PsCredential($user,$password)
  5.  
  6. $From = "System_Mangler@familyenrichment.cc"
  7. $To = "ebosworth@familyenrichment.cc"
  8. $Attachment = "c:backuptoolstesting.csv"
  9. $Subject = "Mileage Date Ranges"
  10. $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"
  11.  
  12. $SMTPServer = "smtp.gmail.com"
  13. $SMTPPort = "587"
  14. Send-MailMessage -From $From -to $To -Subject $Subject `
  15. -Body $Body -SmtpServer $SMTPServer -UseSsl -port $SMTPPort `
  16. -Credential $Credential -Attachments $Attachment
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement