Popular Searches: FrontPage Hosting | FrontPage Templates | FrontPage Training | Free FrontPage

Mailto Form Problems   Logged in as: Guest
  Printable Version
All Forums >>FrontPage Specific Issues >>FrontPage Newbies >> Page: [1]
Name:
Message<< Newer Topic  Older Topic >>

jk15060

 

Posts: 2
Member since: 8/24/2008
 

Mailto Form Problems 

As a relative newbie to FrontPage 2003, I need to build a form that emails the results of a form. I've had a friend write the javascript to perform the calculations, and that works great. But I'm having problems determing the best method for getting the form results emailed to the account being used.

If anyone is online today and knows how to help the URL is:
http://www.drugtestingmatters.com/ContractorsOnly/InvoiceForm.htm

I've changed it so many times, I'm not sure what to try next. My hosting is at GoDaddy, and it's Windows hosted with the FP extensions turned on.

Hope someone can show me the error of my ways.

Janis
  Report Abuse |  Date: 8/24/2008 9:41:08 AM

TexasWebDevelopers

Posts: 7039
Member since: 9/24/2002
From: USA

RE: Mailto Form Problems (in reply to jk15060

The server supports either CDONTS or CDOSYS as the mail client. It is easy to pass the form variables and insert them into ASP code that would fire off a formatted email. Google CDONTS for the simple code. Let us know if you need help passing the variables but here is a brief example/tutorial:
http://www.texaswebdevelopers.com/examples/passingvariables/index.asp


_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 8/24/2008 10:26:58 AM

jk15060

 

Posts: 2
Member since: 8/24/2008
 

RE: Mailto Form Problems (in reply to jk15060

I have seen the CDONTS referenced somewhere before, but didn't quite understand what that meant. I've been studying your URL on passing variables, and am wondering if i follow the same pattern if i want an email message sent. Forgive my ignorance, but this is the very first form I've ever been asked to make and it's driving me crazy. It couldn't be a simple form, but one that required some calculations.

Should I ask the folks at GoDaddy if they use CDONTS or CDOSYS as their mail client? I'm still a bit lost, not knowing what those are. I had this semi-working before but because I had used FTP to upload files, my server extensions were corrupt. Now I believe the extensions are good to go, but still can't quite wrap my mind around how to configure this for email.

Does my form need to be a .asp? It's currently a .htm
Do I need to configure a Results.asp file?
Do I use the "Send to Other" when configuring the email portion of the form?
Or do I use the "Send to" Email address: ??

Sorry to be so thick. I can do all sorts of systems administration, but fp has me scratchin' my head. ;-)

Thanks for the reply, by the way.

Janis
  Report Abuse |  Date: 8/24/2008 10:51:06 AM

TexasWebDevelopers

Posts: 7039
Member since: 9/24/2002
From: USA

RE: Mailto Form Problems (in reply to jk15060

Hi Janis,
You do not want to use the FrontPage extensions to do this at all.
The form can be .htm but the email processing page needs to be an asp page.
The structure is simple--create the form; have the form "post" to an asp page ..call it whatever you want...on the asp page is the simple code to get the form fields from the form; the CDONTS code that sends the email; and a redirect that thanks the user after the email has been sent:
<%
name = Trim(Replace(Request.Form("name"),"'",""))
eMail_Address = Trim(Replace(Request.Form("eMail_Address"),"'",""))
comments = Trim(Replace(Request.Form("comments"),"'",""))
'This sends and email to the person who filled out the form and a bcc to you
Dim str
str = "Information Request from TWD" & vbCrLf & vbCrLf
str = str & "Contact information From: " & vbCrLf
str = str & "Name: " & Request.Form("name") & vbCrLf
str = str & "mailto:" & Request.Form("eMail_Address") & vbCrLf
str = str & "Comments:" & Request.Form("comments") & vbCrLf & vbCrLf
Dim myMail
Set myMail = Server.CreateObject("SMTPsvg.Mailer")
myMail.RemoteHost = "mail.yoursite.com"
myMail.FromAddress = "info@yoursite.com"
myMail.AddRecipient Request.Form("name"), Request.Form("eMail_Address")
myMail.AddBcc "you", "you@yoursite.com"
myMail.Subject = "Thank you"
myMail.BodyText = str
myMail.SendMail
Set myMail = Nothing
Response.Redirect("thankyou.asp")
%>


_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 8/24/2008 4:15:39 PM
Page:   [1]
All Forums >>FrontPage Specific Issues >>FrontPage Newbies >> Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



Forum Software powered by ASP Playground Advanced Edition 2.0.5
Copyright © 2000 - 2003 ASPPlayground.NET

0.03125