<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/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>Tips &amp; Tricks</title><link>http://forums.asp.net/53.aspx</link><description>Cool code and exciting examples, provided by our members.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: How to send an email with attachment in asp.net 2.0</title><link>http://forums.asp.net/thread/3444027.aspx</link><pubDate>Tue, 06 Oct 2009 19:55:26 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3444027</guid><dc:creator>jrstafford1</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3444027.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=53&amp;PostID=3444027</wfw:commentRss><description>&lt;p&gt;Thanks for the posts guys...this was very helpful!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to send an email with attachment in asp.net 2.0</title><link>http://forums.asp.net/thread/3417290.aspx</link><pubDate>Mon, 21 Sep 2009 19:14:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3417290</guid><dc:creator>qwsoftdraw</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3417290.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=53&amp;PostID=3417290</wfw:commentRss><description>&lt;p&gt;Thank you for responding.&lt;/p&gt;&lt;p&gt;For some reason now on my website when I use the same code I had been using, it sends just the name of the attached file. I have to wonder if my website company caught the error and corrected it themselves.&lt;/p&gt;&lt;p&gt;Anyways...what I want done is working now.&lt;/p&gt;&lt;p&gt;Trying the code you gave me just gave me Security Errors, but again, thank you for responding.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to send an email with attachment in asp.net 2.0</title><link>http://forums.asp.net/thread/3414759.aspx</link><pubDate>Sat, 19 Sep 2009 17:13:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3414759</guid><dc:creator>mudassarkhan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3414759.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=53&amp;PostID=3414759</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Refer here I have explained the same &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.aspsnippets.com/post/2009/08/04/Contact-Us-Form-with-Rich-TextBox-in-ASPNet.aspx"&gt;http://www.aspsnippets.com/post/2009/08/04/Contact-Us-Form-with-Rich-TextBox-in-ASPNet.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: How to send an email with attachment in asp.net 2.0</title><link>http://forums.asp.net/thread/3414663.aspx</link><pubDate>Sat, 19 Sep 2009 15:35:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3414663</guid><dc:creator>qwsoftdraw</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3414663.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=53&amp;PostID=3414663</wfw:commentRss><description>&lt;p&gt;Is there a way using ASP.net 2.0 and visual basic that a person can rename an attachment before it reaches the person your sending it to by email. For example, I want to send an email with an attachment from my website. I have been able to send an email with an attachment from a website successfully, but when I receive the email, the attachment not only has the original name of the file, but it also contains the name of the web path. For instance, if the file is Test.zip and it&amp;#39;s located on a web server D:\Base\mywebname.com\TestFolder, then the zip file shows up in my email as: _Base_mywebname.com_TestFolder_Test.zip.&lt;/p&gt;&lt;p&gt;I do not want the path name to be viewable by the person who receives the attachment by email. Is there a way to keep the path from showing up in the final attachment file name?&lt;/p&gt;&lt;p&gt;Thanks in advance.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to send an email with attachment in asp.net 2.0</title><link>http://forums.asp.net/thread/1956471.aspx</link><pubDate>Mon, 15 Oct 2007 14:08:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1956471</guid><dc:creator>handy01</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1956471.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=53&amp;PostID=1956471</wfw:commentRss><description>&lt;p&gt;Please check on the link below&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.worldofasp.net/aspnet/Tutorials/Email_ASP.NET2/Sending_Email_in_ASP.NET_2.0_83.aspx"&gt;http://www.worldofasp.net/aspnet/Tutorials/Email_ASP.NET2/Sending_Email_in_ASP.NET_2.0_83.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: How to send an email with attachment in asp.net 2.0</title><link>http://forums.asp.net/thread/1942366.aspx</link><pubDate>Fri, 05 Oct 2007 08:43:50 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1942366</guid><dc:creator>dotnet_lee</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1942366.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=53&amp;PostID=1942366</wfw:commentRss><description>&lt;p&gt;Heres another one - In ASP.NET 2.0 using VB also attaching a file like shown above&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;    Public Shared Function SendMail(ByVal strFrom As String, ByVal strTo As String, ByVal strSubject As String, ByVal strMessage As String) As Boolean&lt;br /&gt;        Try&lt;br /&gt;        Dim MySmtpClient As New System.Net.Mail.SmtpClient(&amp;quot;Your SMTP Server&amp;quot;)&lt;br /&gt;        MySmtpClient.Credentials = New System.Net.NetworkCredential(&amp;quot;Your-username&amp;quot;, &amp;quot;Your-password&amp;quot;)&lt;br /&gt;        Dim msg As New System.Net.Mail.MailMessage(strFrom, strTo, strSubject, strMessage)&lt;br /&gt;        msg.BodyEncoding = Encoding.UTF8&lt;br /&gt;        msg.IsBodyHtml = True&lt;br /&gt;        msg.Priority = Net.Mail.MailPriority.High&lt;br /&gt;&lt;br /&gt;        &amp;#39;Add an Attachment&lt;br /&gt;        Dim at As New System.Net.Mail.Attachment(Current.Server.MapPath(&amp;quot;~/Uploaded/txt.doc&amp;quot;))&lt;br /&gt;        msg.Attachments.Add(at)&lt;br /&gt;&lt;br /&gt;        MySmtpClient.Send(msg)&lt;br /&gt;        Return True&lt;br /&gt;&lt;br /&gt;        Catch ex As Exception&lt;br /&gt;            Throw ex&lt;br /&gt;        End Try&lt;br /&gt;    End Function&lt;/pre&gt;&amp;nbsp;&amp;nbsp;</description></item><item><title>Re: How to send an email with attachment in asp.net 2.0</title><link>http://forums.asp.net/thread/1910740.aspx</link><pubDate>Sat, 15 Sep 2007 21:59:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1910740</guid><dc:creator>Stoian Bucovich</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1910740.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=53&amp;PostID=1910740</wfw:commentRss><description>&lt;p&gt;Here is how I use to send e-mail from the web feedback form (the code is&amp;nbsp; VB), and I am using server credentials:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Imports System.Net.Mail&lt;/p&gt;
&lt;p&gt;Partial Class ContactsEnglish&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inherits System.Web.UI.Page&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Protected Sub send_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles send.Click&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Page.IsValid() Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim mySmtpClient As New SmtpClient&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myMail As New MailMessage&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myFrom As New MailAddress(email.Text)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myTo As New MailAddress(&amp;quot;recipients_email&lt;a href="mailto:recipients_email@server.com"&gt;@server.com&lt;/a&gt;&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMail.BodyEncoding = System.Text.Encoding.UTF8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMail.To.Add(myTo)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMail.From = myFrom&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMail.Subject = &amp;quot;Mail&amp;#39;s subject goes here&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMail.Body = vbCrLf &amp;amp; &amp;quot;Country: &amp;quot; &amp;amp; country.Text &amp;amp; vbCrLf &amp;amp; vbCrLf &amp;amp; &amp;quot;Name: &amp;quot; &amp;amp; name.Text &amp;amp; vbCrLf &amp;amp; vbCrLf &amp;amp; &amp;quot;Phone number: &amp;quot; &amp;amp; phone.Text &amp;amp; vbCrLf &amp;amp; vbCrLf &amp;amp; &amp;quot;E-mail: &amp;quot; &amp;amp; email.Text &amp;amp; vbCrLf &amp;amp; vbCrLf &amp;amp; &amp;quot;Inquiry: &amp;quot; &amp;amp; inquiry.Text&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySmtpClient.Host = &amp;quot;&lt;a href="http://www.yourmailserver.com/"&gt;www.YourMailServer.com&lt;/a&gt;&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySmtpClient.Credentials = New System.Net.NetworkCredential(&amp;quot;&lt;a href="mailto:YourMail@server.com"&gt;YourMail@server.com&lt;/a&gt;&amp;quot;, &amp;quot;YourMailPassword&amp;quot;, &amp;quot;&lt;a href="http://www.yourmailserver.com/"&gt;www.YourMailServer.com&lt;/a&gt;&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySmtpClient.Send(myMail)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lbl.Text = &amp;quot;Your message has been sent. Thank you !&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lbl.Text = &amp;quot;Sending failed !&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;br /&gt;End Class&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;P.S.&lt;/p&gt;
&lt;p&gt;This mail will&amp;nbsp; be sent in text format. The asp&amp;#39;s controls that I am using&amp;nbsp; are 5 text boxes, button send and validation controls for the requred field.&lt;/p&gt;
&lt;p&gt;Hope it helps&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;</description></item><item><title>Re: How to send an email with attachment in asp.net 2.0</title><link>http://forums.asp.net/thread/1844825.aspx</link><pubDate>Tue, 07 Aug 2007 10:03:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1844825</guid><dc:creator>ronnieedin</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1844825.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=53&amp;PostID=1844825</wfw:commentRss><description>&lt;p&gt;is there maximum size of attachment&lt;/p&gt;</description></item><item><title>Re: How to send an email with attachment in asp.net 2.0</title><link>http://forums.asp.net/thread/1831864.aspx</link><pubDate>Tue, 31 Jul 2007 04:08:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1831864</guid><dc:creator>kaushalparik27</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1831864.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=53&amp;PostID=1831864</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;code to Send Mail:

C#

&lt;span class="kwd"&gt;using&lt;/span&gt; System.Net;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Net.Mail;
-----------------------

        &lt;span class="kwd"&gt;public static bool&lt;/span&gt; SendMail(&lt;span class="kwd"&gt;string&lt;/span&gt; strFrom, &lt;span class="kwd"&gt;string&lt;/span&gt; strTo, &lt;span class="kwd"&gt;string&lt;/span&gt; strSubject, &lt;span class="kwd"&gt;string&lt;/span&gt; strMsg)
        {            
            &lt;span class="kwd"&gt;try&lt;/span&gt;
            {                
                &lt;span class="cmt"&gt;// Create the mail message&lt;/span&gt;
                MailMessage objMailMsg = &lt;span class="kwd"&gt;new&lt;/span&gt; MailMessage(strFrom, strTo);
                
                objMailMsg.BodyEncoding = Encoding.UTF8;
                objMailMsg.Subject = strSubject;
                objMailMsg.Body = strMsg;
                objMailMsg.Priority = MailPriority.High;
                objMailMsg.IsBodyHtml = &lt;span class="kwd"&gt;true&lt;/span&gt;;

                &lt;span class="cmt"&gt;//prepare to send mail via SMTP transport&lt;/span&gt;
                SmtpClient objSMTPClient = &lt;span class="kwd"&gt;new&lt;/span&gt; SmtpClient();
                objSMTPClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
                objSMTPClient.Send(objMailMsg);
                &lt;span class="kwd"&gt;return true&lt;/span&gt;;                
            }
            &lt;span class="kwd"&gt;catch&lt;/span&gt; (Exception ex)
            {
                &lt;span class="kwd"&gt;throw&lt;/span&gt; ex;
            }
        }     

 &amp;nbsp;&lt;pre class="coloredcode"&gt;VB:

&lt;span class="kwd"&gt;Public Shared Function&lt;/span&gt; SendMail(&lt;span class="kwd"&gt;ByVal&lt;/span&gt; strFrom &lt;span class="kwd"&gt;As String&lt;/span&gt;, &lt;span class="kwd"&gt;ByVal&lt;/span&gt; strTo &lt;span class="kwd"&gt;As String&lt;/span&gt;, &lt;span class="kwd"&gt;ByVal&lt;/span&gt; strSubject &lt;span class="kwd"&gt;As String&lt;/span&gt;, &lt;span class="kwd"&gt;ByVal&lt;/span&gt; strMsg &lt;span class="kwd"&gt;As String&lt;/span&gt;) &lt;span class="kwd"&gt;As Boolean
			Try&lt;/span&gt;
				&lt;span class="cmt"&gt;&amp;#39; Create the mail message&lt;/span&gt;
				&lt;span class="kwd"&gt;Dim&lt;/span&gt; objMailMsg &lt;span class="kwd"&gt;As&lt;/span&gt; MailMessage = &lt;span class="kwd"&gt;New&lt;/span&gt; MailMessage(strFrom, strTo)

				objMailMsg.BodyEncoding = Encoding.UTF8
				objMailMsg.Subject = strSubject
				objMailMsg.Body = strMsg
				objMailMsg.Priority = MailPriority.High
				objMailMsg.IsBodyHtml = &lt;span class="kwd"&gt;True&lt;/span&gt;

				&lt;span class="cmt"&gt;&amp;#39;prepare to send mail via SMTP transport&lt;/span&gt;
				&lt;span class="kwd"&gt;Dim&lt;/span&gt; objSMTPClient &lt;span class="kwd"&gt;As&lt;/span&gt; SmtpClient = &lt;span class="kwd"&gt;New&lt;/span&gt; SmtpClient()
				objSMTPClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis
				objSMTPClient.Send(objMailMsg)
				&lt;span class="kwd"&gt;Return True
			Catch&lt;/span&gt; ex &lt;span class="kwd"&gt;As&lt;/span&gt; Exception
				&lt;span class="kwd"&gt;Throw&lt;/span&gt; ex
			&lt;span class="kwd"&gt;End Try
End Function&lt;/span&gt;&lt;/pre&gt;&amp;nbsp;&lt;/pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;pre class="coloredcode"&gt;&lt;b&gt;Code to send mail with attechment.,&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwd"&gt;public static bool&lt;/span&gt; SendMail(&lt;span class="kwd"&gt;string&lt;/span&gt; strFrom, &lt;span class="kwd"&gt;string&lt;/span&gt; strTo, &lt;span class="kwd"&gt;string&lt;/span&gt; strSubject, &lt;span class="kwd"&gt;string&lt;/span&gt; strMsg)&lt;br /&gt;        {            &lt;br /&gt;            &lt;span class="kwd"&gt;try&lt;/span&gt;
            {                
                &lt;span class="cmt"&gt;// Create the mail message&lt;/span&gt;
                MailMessage objMailMsg = &lt;span class="kwd"&gt;new&lt;/span&gt; MailMessage(strFrom, strTo);&lt;br /&gt;                &lt;br /&gt;                objMailMsg.BodyEncoding = Encoding.UTF8;&lt;br /&gt;                objMailMsg.Subject = strSubject;&lt;br /&gt;                objMailMsg.Body = strMsg;&lt;br /&gt;                Attachment at = &lt;span class="kwd"&gt;new&lt;/span&gt; Attachment(Server.MapPath(&lt;span class="st"&gt;&amp;quot;~/Uploaded/txt.doc&amp;quot;&lt;/span&gt;));&lt;br /&gt;                objMailMsg.Attachments.Add(at);&lt;br /&gt;                objMailMsg.Priority = MailPriority.High;&lt;br /&gt;                objMailMsg.IsBodyHtml = &lt;span class="kwd"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;                &lt;span class="cmt"&gt;//prepare to send mail via SMTP transport&lt;/span&gt;
                SmtpClient objSMTPClient = &lt;span class="kwd"&gt;new&lt;/span&gt; SmtpClient();&lt;br /&gt;                objSMTPClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;&lt;br /&gt;                objSMTPClient.Send(objMailMsg);&lt;br /&gt;                &lt;span class="kwd"&gt;return true&lt;/span&gt;;                &lt;br /&gt;            }&lt;br /&gt;            &lt;span class="kwd"&gt;catch&lt;/span&gt; (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwd"&gt;throw&lt;/span&gt; ex;&lt;br /&gt;            }&lt;br /&gt;        }        &lt;br /&gt;&lt;br /&gt; hope it helps./.&lt;/pre&gt;&amp;nbsp;</description></item><item><title>How to send an email with attachment in asp.net 2.0</title><link>http://forums.asp.net/thread/1831722.aspx</link><pubDate>Tue, 31 Jul 2007 02:09:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1831722</guid><dc:creator>Suprotim Agarwal</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1831722.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=53&amp;PostID=1831722</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://www.dotnetcurry.com/ShowArticle.aspx?ID=65"&gt;http://www.dotnetcurry.com/ShowArticle.aspx?ID=65&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;HTH,&lt;/p&gt;
&lt;p&gt;Suprotim Agarwal&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>