473,327 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

a form to email

i want to know how can i get the form information with mailbody ? am i doing
wrong with "objMail.Body =......" ? please help!
here it is :
<%@ Import Namespace="System.Web.Mail" %>
<Script Language="VB" Runat="Server">
Sub Send(sender As Object, e As EventArgs)
Dim objMail As New MailMessage()
objMail.From = FromWho.Text & "<" & FromMail.Text & ">"
objMail.To = "ma**@address.com"
objMail.BodyFormat = MailFormat.Text
objMail.BodyEncoding = Encoding.ASCII
objMail.Subject = "Order"
objMail.Body =request.Form("tform""'FromWho','FromMail','tel',' address'")

SmtpMail.SmtpServer = "mail.server.com"
SmtpMail.Send(objMail)
Response.Redirect("abc.htm")
End Sub
</Script>
<Html>
<Head>
<Title>Tester</Title>
</Head>
<Body>

<Form Runat="Server" id=tform>
Namer : <Asp:TextBox Runat="Server" Id="FromWho" Columns="7" /> <br>
Email Address : <Asp:TextBox Runat="Server" Id="FromMail" Columns="20" /><br>
Tel : <Asp:TextBox Runat="Server" Id="tel" Columns="8" /><br>
Address : <Asp:TextBox Runat="Server" Id="address" Columns="20" /><br>
<Asp:Button Runat="Server" OnClick="Send" text="Send" />
</Center>
</Form>
</Body>
</Html>
Jul 21 '05 #1
2 1481
On Fri, 17 Sep 2004 10:33:03 -0700, newer wrote:
i want to know how can i get the form information with mailbody ? am i doing
wrong with "objMail.Body =......" ? please help! .... objMail.Body =request.Form("tform""'FromWho','FromMail','tel',' address'")


request.Form doesn't work that way... try

objMail.Body = FromWho.Text & vbCrLf & FromMail.Text & vbCrLf _
& tel.Text & vbCrLf & address.Text
Jul 21 '05 #2
Ross Presser,
It works now ! Thank you so much !

"newer" wrote:
i want to know how can i get the form information with mailbody ? am i doing
wrong with "objMail.Body =......" ? please help!
here it is :
<%@ Import Namespace="System.Web.Mail" %>
<Script Language="VB" Runat="Server">
Sub Send(sender As Object, e As EventArgs)
Dim objMail As New MailMessage()
objMail.From = FromWho.Text & "<" & FromMail.Text & ">"
objMail.To = "ma**@address.com"
objMail.BodyFormat = MailFormat.Text
objMail.BodyEncoding = Encoding.ASCII
objMail.Subject = "Order"
objMail.Body =request.Form("tform""'FromWho','FromMail','tel',' address'")

SmtpMail.SmtpServer = "mail.server.com"
SmtpMail.Send(objMail)
Response.Redirect("abc.htm")
End Sub
</Script>
<Html>
<Head>
<Title>Tester</Title>
</Head>
<Body>

<Form Runat="Server" id=tform>
Namer : <Asp:TextBox Runat="Server" Id="FromWho" Columns="7" /> <br>
Email Address : <Asp:TextBox Runat="Server" Id="FromMail" Columns="20" /><br>
Tel : <Asp:TextBox Runat="Server" Id="tel" Columns="8" /><br>
Address : <Asp:TextBox Runat="Server" Id="address" Columns="20" /><br>
<Asp:Button Runat="Server" OnClick="Send" text="Send" />
</Center>
</Form>
</Body>
</Html>

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dave | last post by:
Hi, I know i shouldn't work on php forms when i'm going on 30 hours of no sleep, but i did anyway. I'm trying to get the below to work, and i keep getting a parse error line 74, an unexpected ','...
3
by: John | last post by:
Dear all, It been more than 3 days I am trying to debug this program, I interpret it using activePerl and it is giving (perl -wc code_process.pl) no error syntax but when I put it online, change...
13
by: deko | last post by:
I have a basic feedback form with a submit button. After the "send" button is clicked, I want the user to be redirected to a different page that says "Your message has been sent." How do I do...
7
by: h7qvnk7q001 | last post by:
I'm trying to implement a simple server-side form validation (No Javascript). If the user submits a form with errors, I want to redisplay the same form with the errors highlighted. Once the form...
16
by: whyyyy | last post by:
The script below works fine if the form is filled out and submitted. But a (blank) e-mail is sent whenever the page loads, even when the form is not submitted. I would like to receive the e-mail...
7
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
0
by: karen987 | last post by:
Please could someone help me with this code? The problem appears to be a simple one, but i'm not html or ASP literate and need to modify the below code to add 2 things. First a bit about the...
12
by: colt28 | last post by:
Ok so I found an ajax contact form script but i can't get the b****** to work. I made a bunch of alterations to it and it didn't work so i replaced everything with the original and it still didn't...
4
by: zufie | last post by:
I have a main form containing a command SEND button that prompts an email form to pop up. The email address(es) that are supposed to appear on the email form are those corresponding to the...
3
by: ibeehbk | last post by:
Hi. I have a form made in xhtml. I test via vbscript to make sure none of the fields are empty and properly formatted (ie email). All the regular fields work. However, I have two drop down menus...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.