473,473 Members | 4,189 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Submitting huge ASPMail order forms

2 New Member
I have created HUGE order forms for a client using HTML (Dreamweaver Studio MX 2004) for the forms and ASPMail for the submission of the forms. Everything works fine, except ALL the fields are submitted with every order, and I want ONLY the fields that have something in them to be submitted.

Right now my client gets a huge list of all the fields in the forms with most of them blank and a few with numbers denoting how many items a customer wants to order.

The main problem is that I'm not technically a programmer--I'm trying really hard to learn on my own, and it's difficult.

Here's the code from my "form action" page--Please be aware that to protect my client's privacy, I've replace all instances of his name and email address/domain name with "client@domain.com", etc.



<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Order"
Mailer.FromAddress= "root@domain.com"
Mailer.RemoteHost = "mail.domain.com"
Mailer.AddRecipient "ClientName", "client@domain.com"
Mailer.Subject = "Order"
strMsgHeader = "Form Information Follows: " & vbCrLf
for i = 1 to Request.Form.Count
strMsgInfo = strMsgInfo & Request.Form.Key(i) & " - " & Request.Form.Item(i) & vbCrLf
next
strMsgFooter = vbCrLf & "End of form information"
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter

if Mailer.SendMail then
Response.Write "Thank you for using our online ordering system. You will be sent an invoice via email which you may pay online."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
set Mailer = Nothing
%>


Any help anyone could provide would be greatly appreciated.
Jul 21 '06 #1
3 1851
cbrao
3 New Member
Simple..Put a IF condition in for loop like ..
if Request.Form.Item(i)<>"" then
strMsgInfo = strMsgInfo & Request.Form.Key(i) & " - " & Request.Form.Item(i) & vbCrLf
End if
Jul 22 '06 #2
itsjules
2 New Member
Thanks so much; I'll give it a try.

I really appreciate your taking the time to reply :)
Jul 22 '06 #3
wsrinivas
10 New Member
if you have loads of such forms to be processed everyday then may be you save them every forms details as a text file on the server with sessionID as the filename and attached it to the mail or as your client to download using FTP

This will reduce your mailserver overload
Jul 28 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dave Navarro | last post by:
We have a client with a site hosted on Verio which is running ASPMail 4.x I need to send an email to the client with an attachment, however, I'd prefer not to create the attachment on the local...
6
by: Steve Bywaters | last post by:
Since 2000, I have built a web site for a client in ASP, using CDO mail. All has been well, and I have getting extension projects from them <g> But while I was away on the holiday over Christmas,...
1
by: Roy Danon | last post by:
Hi, I'm trying to use ASPmail in order to send an email, for some reason the email arrives to the recipent but the body isn't sent with it and the subject is shown as question marks(encoding...
1
by: shank | last post by:
Has anyone converted from ASPMail to ASPEmail...? 1) I get the following error. Can you offer some insight? 2) Is there an equivalent to this line: Mail.ContentType = "text/html" ...? ...
2
by: Astra | last post by:
Hi All In order for me to validate forms before they are submitted I use an INPUT type of button and fire the OnClick event to check the form before submitting. This is instead of the usual...
7
by: Wilhelm Kutting | last post by:
Hi, is there a possibility to use the RETURN for submitting Formdata instead of pushing the Buttton?
16
by: browntown | last post by:
so I have this application I'm nearly finished with. The only thing the client has requested is the ability to submit the form by pressing "enter". I didn't think this would be a huge pain in the...
4
by: paratge | last post by:
Hi, I'm updating one form in an iframe, with another in a main page. That works fine, th probliem is how to submit two forms with one click. For now i get an error "permission denied" how can...
0
by: Ewen | last post by:
Hi, I've searched the forums but can't find a specific answer to this particular problem. We're using ServerObjects ASPMail (SMTPSVG.DLL) to send system generated emails on behalf of users of...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.