HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
html form w/attachment using ASP
Post new topic   Reply to topic    HTML Help Forum Index -> ASP
View previous topic :: View next topic  
Author Message
james_reis



Joined: 13 Jan 2008
Posts: 15

PostPosted: Tue Jan 29, 2008 11:42 am     html form w/attachment using ASP Reply with quote

Hello. I'm new to ASP so this is just greek to me.

I'm trying to get an HTML form with a browse option that sends the users first name, last name, address, etc. and at least three attachment files (the other two are not required.)to an e-mail address. The site is hosted on godaddy which offers a premade ASP file for forms. However, ASP doesn't support enctype="multipart/form-data" for forms. It only displays the for info and the file extensions of the images.

I e-mailed godaddy and they told me to make a custom form and use the ASP CDONTS code:
relay-hosting.secureserver.net.

The problem is I don't know where to start with this.
A lot of the ASP scripts I found on the 'net are really confusing. Some only have attachments (which require you to list a file from your computer.) Others just list the form information but none of the attachments.

I pretty much found godaddy's gdform.asp useless based on other people who are in the similar situation and more or less from godaddy themselves.

So in a nutshell I want to know this:
-How do I have the e-mail list the user's information AND display the image(s) attached to the form?
-Where do I put the ASP CDONTS code I listed above?

Thanks in advance!


Last edited by james_reis on Tue Jan 29, 2008 11:55 am; edited 1 time in total
james_reis



Joined: 13 Jan 2008
Posts: 15

PostPosted: Tue Jan 29, 2008 11:46 am     Re: html form w/attachment using ASP Reply with quote

Here's the code I found and customized earlier this week. Is this script correct? If so, how do I integrate file attachments to it?

Code:
<%

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then

Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")

objMail.From = Request.Form("email")
objMail.Subject = "Get A Quote"
objMail.To = "richandshirleysqpat1st.net"
objMail.Body = "First Name: " & Request.Form("first name") & vbcrlf &
"Last Name: " & Request.Form("last name") & vbcrlf &
"Address: " & Request.Form("address") & vbcrlf &
"City: " & Request.Form("city") & vbcrlf &
"State: " & Request.Form("State") & vbcrlf &
"Zip: " & Request.Form("address") & vbcrlf &
"Phone: " & Request.Form("phone") & vbcrlf &
"Email: " & Request.Form("email") & vbcrlf & vbcrlf &
Request.Form("Document Description")
objMail.Send

set objMail = nothing

End If
%>
james_reis



Joined: 13 Jan 2008
Posts: 15

PostPosted: Fri Feb 01, 2008 10:31 am     Re: html form w/attachment using ASP Reply with quote

Update: Ok. I found out the above code works fine but I'm changing my plan. I want to send the form to an
e-mail but I want the documents to upload to a separate folder on godaddy.

When the recipient opens the e-mail they'll have the senders information from the form and links to the documents on the server, so when they go to that page they can download them to where ever they want to. That way if some one want to upload a big file in the e-mail it won't effect the upload limit for the
e-mail account.

Is there an easy way to do that?
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Tue Feb 05, 2008 2:58 pm     Reply with quote

I use JMail to process forms and you use something like
Code:
JMail.Sender = Request.Form("EMail")
But I would think that your objMail.From would do the trick for the user.

You might check out www.devshed.com for some ASP programmers.

_________________
Corey
Residential Office Solutions | Mile High Merchant Accounts | Expression Web Blog
yodi



Joined: 06 Feb 2008
Posts: 1

PostPosted: Wed Feb 06, 2008 8:48 am     James , I am having the same problem using godaddy form Reply with quote

James , I am having the same problem using godaddy form, have you got the solution.
james_reis



Joined: 13 Jan 2008
Posts: 15

PostPosted: Thu Feb 07, 2008 8:32 am     Re: James , I am having the same problem using godaddy form Reply with quote

Not yet but I'll keep you all posted. I'm still testing different scripts out and found none successful. If I find a solution, I'll post the working script for you.
nhattruong



Joined: 16 Sep 2009
Posts: 1

PostPosted: Wed Sep 16, 2009 11:04 pm     Re: html form w/attachment using ASP Reply with quote

james_reis wrote:
Update: Ok. I found out the above code works fine but I'm changing my plan. I want to send the form to an
e-mail but I want the documents to upload to a separate folder on godaddy.

When the recipient opens the e-mail they'll have the senders information from the form and links to the documents on the server, so when they go to that page they can download them to where ever they want to. That way if some one want to upload a big file in the e-mail it won't effect the upload limit for the
e-mail account.

Is there an easy way to do that?



thank you for sharing
--------------------------
nuoc hoa| nuoc hoa nam|nuoc hoa nu




[/url]
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> ASP All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial