472,355 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Submitting huge ASPMail order forms

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
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."
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 1750
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
Thanks so much; I'll give it a try.

I really appreciate your taking the time to reply :)
Jul 22 '06 #3
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

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...
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,...
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...
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" ...? ...
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...
by: Wilhelm Kutting | last post by:
Hi, is there a possibility to use the RETURN for submitting Formdata instead of pushing the Buttton?
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...
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...
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...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...

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.