SQL Server Send email using Powershell

Posted by: SQL Server DBA, on 31 Jan 2012 | View original | Bookmarked: 0 time(s)

This article explains how to send an email through Powershell.   Very useful if you have a requirement to automate your scripts and send notifications .  The example is calling the SmtpClient Class , which is part of the .Net Framework. You can call a Function   which makes your scripting   more modular.   #variables $emailFrom = "JackVamvas@sqlserver-dba.com" $emailTo = "dba@sqlserver-dba.com" $subject = "SQLServer-DBA.com: Powershell Function calling an SMTP server" $body...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: SQL | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 270 | Hits: 10

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD