<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to Send Alerts to Your Mailbox using .NET</title>
	<atom:link href="http://www.powershellpro.com/powershell-email-alerts/210/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.powershellpro.com/powershell-email-alerts/210/</link>
	<description>Sharing the Experience</description>
	<lastBuildDate>Mon, 06 Sep 2010 23:05:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kevin Marquette</title>
		<link>http://www.powershellpro.com/powershell-email-alerts/210/comment-page-1/#comment-503</link>
		<dc:creator>Kevin Marquette</dc:creator>
		<pubDate>Fri, 09 Jul 2010 21:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-email-alerts/210/#comment-503</guid>
		<description>This is a great example of how to send emails from Powershell.

You should offer your colleague version 2 of the script where you just delete the file for him.</description>
		<content:encoded><![CDATA[<p>This is a great example of how to send emails from Powershell.</p>
<p>You should offer your colleague version 2 of the script where you just delete the file for him.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.powershellpro.com/powershell-email-alerts/210/comment-page-1/#comment-473</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sat, 01 May 2010 02:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-email-alerts/210/#comment-473</guid>
		<description>I have the template set up in powershell and was wondering how to test it to see if it works?</description>
		<content:encoded><![CDATA[<p>I have the template set up in powershell and was wondering how to test it to see if it works?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stogie</title>
		<link>http://www.powershellpro.com/powershell-email-alerts/210/comment-page-1/#comment-270</link>
		<dc:creator>Stogie</dc:creator>
		<pubDate>Wed, 31 Dec 2008 18:10:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-email-alerts/210/#comment-270</guid>
		<description>I&#039;m having difficulty getting an array of values that I&#039;m trying send as the $mail.body - despite every formatting trick I&#039;ve tried, they continuously come across all strung together.  The best I&#039;ve been able to do is send in non-HTML format to Outlook and the message &quot;Extra line breaks in this message were removed.&quot; appears above the To: line.  I can click that and then the message appears as I would like, but that&#039;s a hassle given the nature of how my alerts work.

Here&#039;s the code that almost works:

... $result is loaded as an array from a SQL query ...

$result = $DataSet.Tables[0] &#124; foreach-object { $mail.Body += $_.msg+&quot;`n&quot; }

if ($mail.Body -ne $null) {
      $smtp = new-object System.Net.Mail.SmtpClient(”my.mail.server”)
      $smtp.Send($mail) }</description>
		<content:encoded><![CDATA[<p>I&#8217;m having difficulty getting an array of values that I&#8217;m trying send as the $mail.body &#8211; despite every formatting trick I&#8217;ve tried, they continuously come across all strung together.  The best I&#8217;ve been able to do is send in non-HTML format to Outlook and the message &#8220;Extra line breaks in this message were removed.&#8221; appears above the To: line.  I can click that and then the message appears as I would like, but that&#8217;s a hassle given the nature of how my alerts work.</p>
<p>Here&#8217;s the code that almost works:</p>
<p>&#8230; $result is loaded as an array from a SQL query &#8230;</p>
<p>$result = $DataSet.Tables[0] | foreach-object { $mail.Body += $_.msg+&#8221;`n&#8221; }</p>
<p>if ($mail.Body -ne $null) {<br />
      $smtp = new-object System.Net.Mail.SmtpClient(”my.mail.server”)<br />
      $smtp.Send($mail) }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sasko</title>
		<link>http://www.powershellpro.com/powershell-email-alerts/210/comment-page-1/#comment-220</link>
		<dc:creator>Sasko</dc:creator>
		<pubDate>Mon, 22 Sep 2008 08:01:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-email-alerts/210/#comment-220</guid>
		<description>instead: &quot;$smtp.Credentials = New-Object System.Net.NetworkCredential(&quot;username&quot;, &quot;passwd&quot;);&quot;
you can use: $smtp.UseDefaultCredentials = $true</description>
		<content:encoded><![CDATA[<p>instead: &#8220;$smtp.Credentials = New-Object System.Net.NetworkCredential(&#8220;username&#8221;, &#8220;passwd&#8221;);&#8221;<br />
you can use: $smtp.UseDefaultCredentials = $true</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deon</title>
		<link>http://www.powershellpro.com/powershell-email-alerts/210/comment-page-1/#comment-211</link>
		<dc:creator>Deon</dc:creator>
		<pubDate>Mon, 15 Sep 2008 04:33:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-email-alerts/210/#comment-211</guid>
		<description>Hi, I&#039;m having issues running your script I get

&quot;New-Object : Cannot find type [System.Net.MailAddress]: make sure the assembly containing this type is loaded&quot; as an error.

I am running powershell 1.0

I modified your script though so that instead of

$mail.From = New-Object System.Net.MailAddress(&quot;user@domain.com&quot;);

it becomes

$mail.From = user@domain.com&quot;;

and it seems to work now. I&#039;m just posting to let you know.</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m having issues running your script I get</p>
<p>&#8220;New-Object : Cannot find type [System.Net.MailAddress]: make sure the assembly containing this type is loaded&#8221; as an error.</p>
<p>I am running powershell 1.0</p>
<p>I modified your script though so that instead of</p>
<p>$mail.From = New-Object System.Net.MailAddress(&#8220;user@domain.com&#8221;);</p>
<p>it becomes</p>
<p>$mail.From = <a href="mailto:user@domain.com">user@domain.com</a>&#8220;;</p>
<p>and it seems to work now. I&#8217;m just posting to let you know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EDF</title>
		<link>http://www.powershellpro.com/powershell-email-alerts/210/comment-page-1/#comment-192</link>
		<dc:creator>EDF</dc:creator>
		<pubDate>Mon, 18 Aug 2008 13:16:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-email-alerts/210/#comment-192</guid>
		<description>AWESOME!  Thank you!</description>
		<content:encoded><![CDATA[<p>AWESOME!  Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Hamrick</title>
		<link>http://www.powershellpro.com/powershell-email-alerts/210/comment-page-1/#comment-191</link>
		<dc:creator>Jesse Hamrick</dc:creator>
		<pubDate>Fri, 15 Aug 2008 22:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-email-alerts/210/#comment-191</guid>
		<description>Since I&#039;m connecting to a share, I set up the task scheduler to run under an account that has access to the local system and the file on the file server. The script runs when no one is logged on the system.  Yes, It should work with all ps1 scripts.
To set up a ps1 file to run in a scheduled task:
Path in Run box: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -command &quot;&amp; C:\Path\scriptName.ps1&quot;
This consists of the location of PowerShell.exe (above is the default location) and the script you wish to run.
If there a spaces in the path name it should look like this &quot;&amp; &#039;C:\Program Files\Scripts\ScriptName.ps1&#039;&quot;</description>
		<content:encoded><![CDATA[<p>Since I&#8217;m connecting to a share, I set up the task scheduler to run under an account that has access to the local system and the file on the file server. The script runs when no one is logged on the system.  Yes, It should work with all ps1 scripts.<br />
To set up a ps1 file to run in a scheduled task:<br />
Path in Run box: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -command &#8220;&#038; C:\Path\scriptName.ps1&#8243;<br />
This consists of the location of PowerShell.exe (above is the default location) and the script you wish to run.<br />
If there a spaces in the path name it should look like this &#8220;&#038; &#8216;C:\Program Files\Scripts\ScriptName.ps1&#8242;&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EDF</title>
		<link>http://www.powershellpro.com/powershell-email-alerts/210/comment-page-1/#comment-190</link>
		<dc:creator>EDF</dc:creator>
		<pubDate>Fri, 15 Aug 2008 22:19:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-email-alerts/210/#comment-190</guid>
		<description>How did you get AlertMe.ps1 to be scheduled and still run with noone logged onto the system?  Would that work with all ps1 scripts?</description>
		<content:encoded><![CDATA[<p>How did you get AlertMe.ps1 to be scheduled and still run with noone logged onto the system?  Would that work with all ps1 scripts?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
