<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: System.Net.Mail How To</title>
	<link>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/</link>
	<description>Articles on VB.NET and Software Development Team Leadership</description>
	<pubDate>Sat, 22 Nov 2008 06:11:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: Susan</title>
		<link>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-1145</link>
		<author>Susan</author>
		<pubDate>Sun, 29 Jun 2008 06:13:01 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-1145</guid>
		<description>&#62; Can you explain me the “UserToken” in the SendAsync method?

Ugh.  What do we put in for a value in "UserToken"????

Without that info...  none of this works at all.</description>
		<content:encoded><![CDATA[<p>&gt; Can you explain me the “UserToken” in the SendAsync method?</p>
<p>Ugh.  What do we put in for a value in &#8220;UserToken&#8221;????</p>
<p>Without that info&#8230;  none of this works at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yadira</title>
		<link>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-1004</link>
		<author>Yadira</author>
		<pubDate>Tue, 12 Feb 2008 16:06:41 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-1004</guid>
		<description>Hi !!

Can you explain me the  "UserToken" in the SendAsync  method?

Thanks !!</description>
		<content:encoded><![CDATA[<p>Hi !!</p>
<p>Can you explain me the  &#8220;UserToken&#8221; in the SendAsync  method?</p>
<p>Thanks !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jfrankcarr</title>
		<link>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-812</link>
		<author>jfrankcarr</author>
		<pubDate>Fri, 26 Oct 2007 14:20:20 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-812</guid>
		<description>Thanks Jay. I'm always glad to help.</description>
		<content:encoded><![CDATA[<p>Thanks Jay. I&#8217;m always glad to help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jay</title>
		<link>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-811</link>
		<author>jay</author>
		<pubDate>Fri, 26 Oct 2007 04:19:15 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-811</guid>
		<description>Thanks a lot It's help a lot</description>
		<content:encoded><![CDATA[<p>Thanks a lot It&#8217;s help a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jfrankcarr</title>
		<link>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-774</link>
		<author>jfrankcarr</author>
		<pubDate>Wed, 17 Oct 2007 13:02:58 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-774</guid>
		<description>Hi Irene

Yes. The SmtpClient object has an event called SendCompleted. To use it you would have to declare this object at the module level and add a handler. Here's an example. First the code to initialize the SmtpClient and add the handler:

&lt;pre class="csharpcode"&gt;EmailServer = &lt;span class="kwrd"&gt;New&lt;/span&gt; System.Net.Mail.SmtpClient(EmailServerName)
&lt;span class="kwrd"&gt;AddHandler&lt;/span&gt; EmailServer.SendCompleted, &lt;span class="kwrd"&gt;AddressOf&lt;/span&gt; EmailSendCompleted&lt;/pre&gt;

Now the routine that waits for the SendCompleted event.

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; EmailSendCompleted(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; sender &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Object&lt;/span&gt;, &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; e &lt;span class="kwrd"&gt;As&lt;/span&gt; System.ComponentModel.AsyncCompletedEventArgs)
    &lt;span class="kwrd"&gt;If&lt;/span&gt; e.&lt;span class="kwrd"&gt;Error&lt;/span&gt; IsNot &lt;span class="kwrd"&gt;Nothing&lt;/span&gt; &lt;span class="kwrd"&gt;OrElse&lt;/span&gt; e.Cancelled &lt;span class="kwrd"&gt;Then&lt;/span&gt;
        &lt;span class="rem"&gt;'do error management &lt;/span&gt;
    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;
&lt;span class="kwrd"&gt;End&lt;/span&gt; Sub&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Irene</p>
<p>Yes. The SmtpClient object has an event called SendCompleted. To use it you would have to declare this object at the module level and add a handler. Here&#8217;s an example. First the code to initialize the SmtpClient and add the handler:</p>
<pre class="csharpcode">EmailServer = <span class="kwrd">New</span> System.Net.Mail.SmtpClient(EmailServerName)
<span class="kwrd">AddHandler</span> EmailServer.SendCompleted, <span class="kwrd">AddressOf</span> EmailSendCompleted</pre>
<p>Now the routine that waits for the SendCompleted event.</p>
<pre class="csharpcode"><span class="kwrd">Private</span> <span class="kwrd">Sub</span> EmailSendCompleted(<span class="kwrd">ByVal</span> sender <span class="kwrd">As</span> <span class="kwrd">Object</span>, <span class="kwrd">ByVal</span> e <span class="kwrd">As</span> System.ComponentModel.AsyncCompletedEventArgs)
    <span class="kwrd">If</span> e.<span class="kwrd">Error</span> IsNot <span class="kwrd">Nothing</span> <span class="kwrd">OrElse</span> e.Cancelled <span class="kwrd">Then</span>
        <span class="rem">&#8216;do error management </span>
    <span class="kwrd">End</span> <span class="kwrd">If</span>
<span class="kwrd">End</span> Sub</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: irene</title>
		<link>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-773</link>
		<author>irene</author>
		<pubDate>Wed, 17 Oct 2007 06:50:17 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/05/27/systemnetmail-how-to/#comment-773</guid>
		<description>Using Sendsync, can I know whether the email has been sent?</description>
		<content:encoded><![CDATA[<p>Using Sendsync, can I know whether the email has been sent?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
