Advertisement
Guest User

Emailme function

a guest
Nov 22nd, 2013
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #rem email me function. Pipe any command into this to #have the output emailed to you.
  2.  
  3. function emailme{
  4. $body = @( $input )
  5. $body = $body | out-string
  6. $email = @{
  7. From = "(enterfromemailhere) "
  8. To = "(entertoemailhere)"
  9. Subject = "The Data You Requested"
  10. SMTPServer = "(smtpserveriphere) "
  11. Body = $body
  12. }
  13. send-mailmessage @email
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement