Difference between revisions of "Power Shell"

Jump to navigation Jump to search
254 bytes added ,  14:18, 3 August 2010
Added "SMTP / Email Sending"
m (→‎= Comparison: Typo fix)
(Added "SMTP / Email Sending")
Line 556: Line 556:
$cmd = New-Object MySql.Data.MySqlClient.MySqlCommand("USE $database", $conn)
$cmd = New-Object MySql.Data.MySqlClient.MySqlCommand("USE $database", $conn)
</source>
</source>
== SMTP / Email Sending ==
http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx#
<source lang="powershell">
$smtp = New-Object Net.Mail.SmtpClient -arg $smtpServer
$smtp.Send($emailFrom,$emailRcpt,$emailSubject,$msgBody)
</source>


== Exceptions and Error Handling ==
== Exceptions and Error Handling ==

Navigation menu