<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>sunitc's WebLog</title><link>http://blogs.msdn.com/sunitc/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>System.Web.Mail</title><link>http://blogs.msdn.com/sunitc/archive/2004/05/31/144989.aspx</link><pubDate>Mon, 31 May 2004 21:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144989</guid><dc:creator>sunitc</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.msdn.com/sunitc/comments/144989.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sunitc/commentrss.aspx?PostID=144989</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Verdana color=#a52a2a size=2&gt;It has been a long time since I have written a&amp;nbsp;component that sends email.&amp;nbsp; In the .NET world, sending email has been made very easy and all the objects are defind under the System.Web.Mail namespace.&amp;nbsp; System.Web.Mail is a simple wrapper for the COM objects in cdonts.dll and cdosys.dll.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#a52a2a size=2&gt;Following is a code snipped for sending email with an attachment:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailMessage MailMsg= new MailMessage();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailMsg.To = "&lt;/FONT&gt;&lt;A href="mailto:sunitc@microsoft.com"&gt;&lt;FONT face=Verdana size=2&gt;sunitc@microsoft.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailMsg.From = "&lt;/FONT&gt;&lt;A href="mailto:SWM_Test@sunitc.com"&gt;&lt;FONT face=Verdana size=2&gt;SWM_Test@sunitc.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailMsg.Subject = "[info] System.Wed.Mail Test Message";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailMsg.Body = "System.Web.Mail Body of the Message";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Create the attachment : enter the correct path to the file that is to be attached&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailAttachment attachment = new MailAttachment("mypath\test.txt"); //create the attachment&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MailMsg.Attachments.Add( attachment );&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Put in your real smtp server below&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SmtpMail.SmtpServer = "mySmtpServer"; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SmtpMail.Send( MailMsg);&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=144989" width="1" height="1"&gt;</description></item><item><title>May you live in Interesting times</title><link>http://blogs.msdn.com/sunitc/archive/2004/05/03/125297.aspx</link><pubDate>Tue, 04 May 2004 00:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:125297</guid><dc:creator>sunitc</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/sunitc/comments/125297.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sunitc/commentrss.aspx?PostID=125297</wfw:commentRss><description>&lt;FONT face=Verdana color=#000080&gt;
&lt;P&gt;&lt;SPAN style="COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: navy; FONT-FAMILY: Verdana"&gt;After months of unrelenting pressure from my big brother (Vinit Carpenter), I have decided to start blogging. :-)&amp;nbsp; &lt;/SPAN&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: navy; FONT-FAMILY: Verdana"&gt;I am an App Dev consultant and work for Microsoft Consulting Services.&amp;nbsp; I primarily work with Biztalk Server 2004 and .NET related technologies.&amp;nbsp; I recently moved to &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:City w:st="on"&gt;Miami&lt;/st1:City&gt; from &lt;st1:place w:st="on"&gt;&lt;st1:City w:st="on"&gt;Santa Monica&lt;/st1:City&gt;, &lt;st1:State w:st="on"&gt;CA&lt;/st1:State&gt;&lt;/st1:place&gt; and am now focused on public sector related projects.&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: navy; FONT-FAMILY: Verdana"&gt;In the coming days, weeks and months, I will have many interesting technical and non technical tit-bits to share and will do so via my blog.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=125297" width="1" height="1"&gt;</description></item></channel></rss>