Wednesday, 7 December 2016

POWERSHELL SCRIPT TO SEND MAIL (SMTP.SEND)

            
            $smtpServer = "webmail.domainname.com"  
   
            # Send E-Mail
            $msg = new-object Net.Mail.MailMessage
            $smtp = new-object Net.Mail.SmtpClient($smtpServer)
   
            $msg.From = "yourname.s@domainame.com"
            $msg.Subject = "Warning: ping failed "
            $msg.Body = "The Linkwith ip adres $ip does not reply! "
               
            $smtp.Send($msg



No comments:

Post a Comment

Git

1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...