View Full Version : ASP CDONTS Question

02-16-2003, 07:36 AM
Here goes,

I asked the question a while back about ASP forms using CDONTS and I got a lot of good answers back, but one. Can someone please take a look at bu.txt to see why I cannot send this thru e-mail?

I have working on example after example and it just does not work for me. They all seem to be limited to the basic e-mail fields. Not broekn down in the subject.

This has to be done in ASP 2.0 - 3.0 not ASP .NET. Secondly, what is the limit of fields you can transfer to an e-mail? Is CDONTS limited to just to, from , subject, and body fields or can you break it down further?

Thank you in advance for your help in this, Phillip

Whammy, sorry about the length of the attachment, I just need help finishing this out for my manager.

02-16-2003, 03:15 PM
What do you mean by "break it down further"?

02-16-2003, 08:15 PM
If I try to send that submit that form it does not work. What I am looking for is an easy way to send a form with all the elements intacted. Right now, when take out everything but the typical -
to, from, subject, and body, it works, but not with all the fields in it. My host supports CDONTS and Jmail. I have never used Jmail so I was going to try my gander at CDONTS. I just thought the way it e-mailed was all the fields had to have a name and the rest was history. Does CDONTS support other fields than the typical four?

Thanks, Phillip

02-16-2003, 10:51 PM
Unfortunately, I don't understand what you mean either. Do you mean you're having trouble displaying form input in the "body" of the message?

02-16-2003, 11:04 PM
What I am looking for is a way a visitor can fill out a form -
name, email, address, phone number, skills, etc... and have those populate an email. When a user hits submit it e-mails the owner of the website all the information he/she typed in the form. Right now if you look at the code, the first part verifies something is entered, the 2nd part is the actual form, and the third part sends the form out. What is stopping it is the asp portion I think. I believe I got the CDONTS right (I think), but the form will not send. If I delete all fields except to, from, subject, and body, it all works like it should, only when more fields are added. I am sorry for the confusion but that is what I am looking for.

Thanks, Phillip

02-16-2003, 11:48 PM
Do you have a link to your form? I can write it up for ya real quick. Free...

02-16-2003, 11:52 PM
First off, thank you. Secondly, here is the link:

Form Link (http://www.technologyaspects.com/form_mail.asp)

All the asp code is included in the attachment.

I appreciate this, Phillip

02-16-2003, 11:59 PM

Sorry forgot the attachment.

Thanks, Phillip

02-17-2003, 12:13 AM
Ok, I just used what you had, so it doesn't look as good as something I would write from scratch. Can't test it on my machine since I don't have CDONTS, but it worked up until the point where it tried to send the email.

Lemme know how it works, you'll see what you were doing wrong when you look at the code. ;)

02-17-2003, 12:59 AM
Thank you Whammy for your help in this. Do you have any idea on how to aspupload to work? I owe you one.

02-17-2003, 01:00 AM
So I'm assuming it works? :)

I haven't used ASPUpload, so I'm not really sure. I know in order to get any third party components to work you have to register the component on the server...

That should work ok, but I do hear good things about Dundas Upload though from fellow developers...


02-17-2003, 01:10 AM
Yes, the form works. I am not opposed to Dundas Upload but my host aspwebserver.com supports ASPUpload, I will try Dundas Upload on it to see if it works.

Thanks again, Phillip

02-17-2003, 01:11 AM
Nah, if they support ASPUpload, I'd just do a google search on it or look for some documentation on their website.

02-17-2003, 01:16 AM
I know how to add a select statement but not associate it with my code. Could you help please?

<TD ALIGN="right" WIDTH="278"><FONT FACE="arial,helvetica" SIZE="2">Own or Rent:</FONT></TD>
<TD WIDTH="320" ALIGN="left"><INPUT TYPE="text" name="u_ownorrent" size="10" value="<%= u_ownorrent %>"></TD>

How would you make that into a Select statement of 'yes' or 'no'?

02-17-2003, 01:33 AM
<td align="right" width="278"><font face="arial,helvetica" size="2">Own or Rent:</font></td>
<td width="320" align="left">
<select name="u_ownorrent">
<option value="Yes"<% If Request.Form("u_ownorrent") = "Yes" Then Response.Write(" selected=""selected""") %>>Yes</option>
<option value="No""<% If Request.Form("u_ownorrent") = "No" Then Response.Write(" selected=""selected""") %>>No</option>

02-17-2003, 04:38 AM

do you know how to do a response.redirect in my form after it is submitted?

Thanks, Phillip

02-17-2003, 07:17 AM
Firstly, to redirect after submitting the form just place response.redirect("yourpage.asp") after all the form processing and mailing has been done.

Secondly, dundas is very good (mailer and upload) but aspupload is another good upload com. You can find sample code at the aspUpload website http://www.aspupload.com .

That's all I think I need to say. :)