mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-22 16:03:22 +01:00
Added email.ps1
This commit is contained in:
parent
21fec16988
commit
db77f72a34
9
Scripts/email.ps1
Normal file
9
Scripts/email.ps1
Normal file
@ -0,0 +1,9 @@
|
||||
mtpServer = "smtp.example.com"
|
||||
$msg = new-object Net.Mail.MailMessage
|
||||
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
|
||||
$msg.From = "me@example.com"
|
||||
$msg.ReplyTo = "me@example.com"
|
||||
$msg.To.Add("you@example.com")
|
||||
$msg.subject = "Test Mail"
|
||||
$msg.body = "This is a test mail."
|
||||
$smtp.Send($msg)
|
Loading…
Reference in New Issue
Block a user