Sending Email from Asp.net
-
Hi everyone. i have a query. Do anyone by chance know how to send a webform from asp.net to an email address? The webform itself consists of many textbox values and i do not want to just send a value across but retrieve multiple values from multiple textboxes and send it across to the user as an email. Please help me. Thanks in advance. frossie
-
Hi everyone. i have a query. Do anyone by chance know how to send a webform from asp.net to an email address? The webform itself consists of many textbox values and i do not want to just send a value across but retrieve multiple values from multiple textboxes and send it across to the user as an email. Please help me. Thanks in advance. frossie
-
Hi everyone. i have a query. Do anyone by chance know how to send a webform from asp.net to an email address? The webform itself consists of many textbox values and i do not want to just send a value across but retrieve multiple values from multiple textboxes and send it across to the user as an email. Please help me. Thanks in advance. frossie
You can build a string with all the information you want to send and use the System.Web.Mail namespace to send a mail containing the string ? My Blog
-
You can build a string with all the information you want to send and use the System.Web.Mail namespace to send a mail containing the string ? My Blog
Can u show me some sample codes to go about doing it? What can i put here, MailMessage.Body = ? How do i send all the multiple values from different textboxes to the body of an email? Currently, i have inserted a asp:panel in my webform with all the textboxes in it, how can i add the panel of stuff into the MailMessage.Body? frossie
-
Can u show me some sample codes to go about doing it? What can i put here, MailMessage.Body = ? How do i send all the multiple values from different textboxes to the body of an email? Currently, i have inserted a asp:panel in my webform with all the textboxes in it, how can i add the panel of stuff into the MailMessage.Body? frossie
You create something to hold the value. One way can be this :
StringBuilder sb = new StringBuilder(); sb.Append(TextBox1.Text + ", " + TextBox2.Text);
Then you put this into your MailMessage.Body property. Another way would be to get the Html of your panel and put it into your MailMessage.Body with the BodyFormat set to Html. My Blog -- modified at 9:19 Monday 10th July, 2006 -
You create something to hold the value. One way can be this :
StringBuilder sb = new StringBuilder(); sb.Append(TextBox1.Text + ", " + TextBox2.Text);
Then you put this into your MailMessage.Body property. Another way would be to get the Html of your panel and put it into your MailMessage.Body with the BodyFormat set to Html. My Blog -- modified at 9:19 Monday 10th July, 2006Thanks for the above codes.:) But i would be more interested if you can further guide me on how to get the HTML of my panel to put it into my MailMessage.Body. By the way, i have already set the BodyFormat to HTML. If u can, please show me a sample code? Thanks in advance. frossie
-
Thanks for the above codes.:) But i would be more interested if you can further guide me on how to get the HTML of my panel to put it into my MailMessage.Body. By the way, i have already set the BodyFormat to HTML. If u can, please show me a sample code? Thanks in advance. frossie
I would recommend you to look at this code snippet. This is the only way I'm aware of. Sorry. :doh: http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet.webcontrols/browse_thread/thread/89d4acb1b5675de9/4abea7433cd21e2d?lnk=st&q=Get+the+InnerHtml+of+a+Panel+ASP.NET&rnum=1&hl=en#4abea7433cd21e2d[^] My Blog
-
Thanks for the above codes.:) But i would be more interested if you can further guide me on how to get the HTML of my panel to put it into my MailMessage.Body. By the way, i have already set the BodyFormat to HTML. If u can, please show me a sample code? Thanks in advance. frossie
Try:
message.Body = Panel.InnerHTML
"Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox -
Try:
message.Body = Panel.InnerHTML
"Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox