Email Confirmation + Database (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Valaire -> Email Confirmation + Database (8/6/2002 14:37:57)

I am following Spooky' s suggestion in the Advanced Tips section of the Database FAQ, but am having trouble with the actual coding process of it.

I have this written in the fpdbform.inc:

sFrom = APXOnline.com
sTo = " apx@apxonline.com"
sSubject = " APXOnline Inquiry Submission"
sBody = " Name = " & Request.Form(" Name" )' s inquiry has been added to the " Form_Type = & Request.Form(" Form_Type" ) database.

Set myCDONTSMail= CreateObject(" CDONTS.NewMail" )
myCDONTSMail.BodyFormat= 1
MyCDONTSMail.MailFormat= 0
myCDONTSMail.Importance= 2
myCDONTSMail.Send sFrom, sTo, sSubject, sBody
Set myCdontsMail= Nothing

It doesn' t send the mail, and I' m sure my syntax is horribly off... can someone let me know how to get it so that the body states something like: " Joe Bob has filled out an inquiry on Power Transformers." Joe Bob, and Power Transformers, being fields in my form and database called Name and Form_Type, respectively.

Would it be posssible to include a hyperlink to the DRW asp page of the inquiry type also?

And I know this has been floating around the forums before, but instead of name is there a way to grab the database ID it is being given and include that in the email so someone can find it in the database quickly?

Thank you,
Chad




junhow -> RE: Email Confirmation + Database (8/6/2002 17:06:14)

I' m definitely not an expert, but I' ll point out 2 things that I notice.
1.) I believe your strFrom needs to have format that matches an email address (e.g. name@here.com). You may need the ' @' symbol.

2.) I belive the Request.Form syntax you use needs to be Request.Form(" Name" ).Item. You have to use the .Item syntax because the Request.Form command actually returns an object rather than text.

On your other questions:
To create you email body use: strBody = Request.Form(" Name" ).Item & " has filled out an inquiry on " & Request.Form(" Form_Type" ).Item

I would think you could include a hyperlink in your strBody string using the <a> html code to point to a DRW asp page. The asp page would be expecting the entry ID found in the database. This ID would be added to the strBody string as part of the hyperlink, e.g. http:\\www.mypage.asp?entryID=123.




no_mac_jack -> RE: Email Confirmation + Database (8/6/2002 18:34:34)

Like you said, I think it' s just the syntax that was messing you up.

When you have a ' literal' value, that is text that you want to be displayed as you typed it, it must be enclosed in double quotes. Values that need to be ' inserted' by the server do not need quotes around them. You can combine the two types by putting an ampersand between them...

sMsg = " Welcome, " & Request.Form(" name" ) & " !"

I just fixed those things in your code so you can try it again. Also, the from field should be an e-mail address.

sFrom = " sender@somewhere.com" 
sTo = " apx@apxonline.com"  
sSubject = " APXOnline Inquiry Submission"  
sBody = Request.Form(" Name" ) & " ' s inquiry has been added to the "  & Request.Form(" Form_Type" ) & " database."  

Set myCDONTSMail= CreateObject(" CDONTS.NewMail" ) 
myCDONTSMail.BodyFormat= 1 
MyCDONTSMail.MailFormat= 0 
myCDONTSMail.Importance= 2 
myCDONTSMail.Send sFrom, sTo, sSubject, sBody 
Set myCdontsMail= Nothing


Well, see how that works and let us know. If you want more information/examples about CDONTS, here are a few links...

DevASP and ASPFAQs.com

As far as getting the ID when you insert the record, Spooky has a tutorial for getting the ID. Once you have the ID, you can send out the e-mail with a hyperlink such as http://www.whateversite.com/detail.asp?id=45. Spooky also has a tutorial on setting up a page like that. [:D]

Like I said, try some of those things out and let us know how it goes. Good luck!

~no_mac_jack




Valaire -> RE: Email Confirmation + Database (8/6/2002 23:45:16)

Thanks so much for the reply, both of you! Your suggestions and help are great and just what I needed. I' ll start implementing everything tomorrow when I go back to work (I' m not zealous enough to work outside office hours just yet :P) and let you know.





clubtnt -> RE: Email Confirmation + Database (8/7/2002 11:32:36)

Is setting the BodyFormat, MailFormat, and Importance required or optional? I' ve tried using CDONTS in the past and could not successfully send any mail. However, I didn' t set a value for those three fields though.




no_mac_jack -> RE: Email Confirmation + Database (8/7/2002 12:08:18)

I honestly don' t know for sure, but the DevASP example didn' t set those formats, so it must just default if you don' t. Still, it couldn' t hurt to try setting them if it isn' t working without them.

~no_mac_jack




Valaire -> RE: Email Confirmation + Database (8/7/2002 16:31:49)

I can' t get it to work still... I have my mail client open and checking for it, but getting nothing...

Here' s my code:

Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)

sFrom = " inquiry@apxonline.com"
sTo = " apx@apxonline.com"
sSubject = " APXOnline Inquiry Submission"
sBody = Request.Form(" Name" ) & " ' s inquiry has been added to the " & Request.Form(" Form_Type" ) & " database."

Set myCDONTSMail= CreateObject(" CDONTS.NewMail" )
myCDONTSMail.BodyFormat= 1
MyCDONTSMail.MailFormat= 0
myCDONTSMail.Importance= 2
myCDONTSMail.Send sFrom, sTo, sSubject, sBody
Set myCdontsMail= Nothing

Response.Write " <html>" & vbCrLf




no_mac_jack -> RE: Email Confirmation + Database (8/7/2002 17:40:18)

Well, let' s add some error-trapping code and see if anything pops up...

sFrom = " inquiry@apxonline.com"  
sTo = " apx@apxonline.com"  
sSubject = " APXOnline Inquiry Submission"  
sBody = Request.Form(" Name" ) & " ' s inquiry has been added to the "  & Request.Form(" Form_Type" ) & " database."  

on error resume next
Set myCDONTSMail= CreateObject(" CDONTS.NewMail" ) 
myCDONTSMail.BodyFormat= 1 
MyCDONTSMail.MailFormat= 0 
myCDONTSMail.Importance= 2 
myCDONTSMail.Send sFrom, sTo, sSubject, sBody 
If err.num <> 0 Then
   Response.Write " CDONTS Error: "  & err.num & "  - "  & err.description 
End If

Set myCdontsMail= Nothing


Maybe that will at least give us an idea of what' s going on...

~no_mac_jack




clubtnt -> RE: Email Confirmation + Database (8/7/2002 21:21:17)

Doesn' t the server have to support CDONTS as well?




Valaire -> RE: Email Confirmation + Database (8/7/2002 21:29:46)

I added the code, unfortunately nothing happened... I submitted another form, got no email.... double-checked the database and the information is correctly inputted there.

Thanks for the help...sorry I' m a pain. :P

Chad




Valaire -> RE: Email Confirmation + Database (8/7/2002 21:31:53)

I' m assuming my server supports CDONTS because the Spooky Login detects it... perhaps it' s not configured properly. I' m in the process of switching hosts anyway, hopefully to parcom.net, if I can convince my boss, cause our current WPP is very very shady -- they don' t list any of their features on their site, and never respond to e-mail. But that' s a gripe for another time. :)

Chad




no_mac_jack -> RE: Email Confirmation + Database (8/8/2002 2:02:32)

So can you send any e-mails thru the Spooky Login with it set to use CDONTS?

Also, maybe just try a *really* basic e-mail like the example at DigitalColony.

Lastly, are both of those e-mail addresses (the " to" and " from" ) valid? I thought I read something somewhere that said they both had to be valid for it to send...not so sure about that, though.

Anyway, those are just some ideas to see whether or not CDONTS is even working...that could be a problem if it isn' t! [:p]

~no_mac_jack




Valaire -> RE: Email Confirmation + Database (8/8/2002 13:09:01)

No luck on that front. I contacted my shady host so I should expect to hear back from them early next week. :)

Thanks for the help, I' ll post back when I' ve got results.

-Chad




no_mac_jack -> RE: Email Confirmation + Database (8/8/2002 13:56:46)

Sounds good. Thx.

~no_mac_jack




Valaire -> RE: Email Confirmation + Database (8/8/2002 14:04:17)

Okay bad news... it' s not the CDONTS because I got a reply stating this:

" CDONTS is installed and is working on the server that your site is
hosted on."

Back to the drawing board... this is how my code looks now:

Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)

sFrom = " valaire@optonline.net" 
sTo = " apx@apxonline.com" 
sSubject = " APXOnline Inquiry Submission" 
sBody = Request.Form(" Name" ) & " ' s inquiry has been added to the "  & Request.Form(" Form_Type" ) & " database."   

on error resume next  
Set myCDONTSMail= CreateObject(" CDONTS.NewMail" )   
myCDONTSMail.BodyFormat= 1   
MyCDONTSMail.MailFormat= 0   
myCDONTSMail.Importance= 2   
myCDONTSMail.Send sFrom, sTo, sSubject, sBody   
If err.num <> 0 Then     
Response.Write " CDONTS Error: "  & err.num & "  - "  & err.description   
End If 
Set myCdontsMail= Nothing 


If anyone has any ideas please let me know... my form/database system won' t work without someone in the office being informed to check the database via an email confirmation so I' m a little desperate [:o].

Thank you!




KeithG -> RE: Email Confirmation + Database (8/9/2002 0:13:08)

Valaire:

I realize I am coming into the conversation a little late and I hope I have read the thread thouroughly enough but I can offer the following code. This code WORKS on my site and several others, maybe try inserting your form field names and see what happens?

<%
Dim Body, Body1, Body2, Body3, Body4, Body5, Body6, Body7, Body8, Body9, Body10, Body11, Body12, Body13, Body14, Body15
Dim MyCDONTSMail
Set MyCDONTSMail = CreateObject(" CDONTS.NewMail" )
MyCDONTSMail.From= Request.form(" req_email" )
MyCDONTSMail.To= Request.form(" email" )
MyCDONTSMail.CC= Request.form(" CC" )
MyCDONTSMail.Subject= Request.form(" subject" )
Body = Request.form(" Body" )
Body1 = " (Some message here if you like.)"
MyCDONTSMail.Body= Body & VBCrLF & VBCrLF & VBCrLF & Body1 & VBCrLF & Body2 & VBCrLF & VBCrLF & Body3 & VBCrLF & VBCrLF &Body4 & VBCrLF & VBCrLF & Body5 &VBCrLF & VBCrLF & Body6 & VBCrLF & Body7 & VBCrLF & Body8 & VBCrLF & Body9 & VBCrLF & Body10 & VBCrLF & VBCrLF & Body11 & VBCrLF & Body12 & VBCrLF & VBCrLF & Body13 &VBCrLF & VBCrLF & Body14 & VBCrLF & Body15
MyCDONTSMail.Send
set MyCDONTSMail=nothing
%>

Oh yeah, and as far as inserting to the database, just build a second, insert query on the page to handle that side.

That' s the way I finally got it to work way back when. Good luck.

Keith




Valaire -> RE: Email Confirmation + Database (8/9/2002 13:12:08)

Hmm I don' t notice many differences besides the DIM statements...which I' m assuming is a variable type declaration...? I' ll try to add that and see what happens. :) Thanks.

I' ve got one week left here before I go back to school and need to get this thing sending emails before I leave. The database is up and fine, and independent of this problem. I just need an email confirmation, and some nice links to the record, which I know how to do now...just as soon as my email sends.

-Chad




Valaire -> RE: Email Confirmation + Database (8/9/2002 13:42:25)

I added some Dims for fun and no luck...

Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)

Dim sFrom, sTo, sSubject, sBody
sFrom = " valaire@optonline.net" 
sTo = " apx@apxonline.com" 
sSubject = " APXOnline Inquiry Submission" 
sBody = Request.Form(" Name" ) & " ' s inquiry has been added to the "  & Request.Form(" Form_Type" ) & " database."   

on error resume next
Dim myCDONTSmail  
Set myCDONTSMail= CreateObject(" CDONTS.NewMail" )   
myCDONTSMail.BodyFormat= 1   
myCDONTSMail.MailFormat= 0   
myCDONTSMail.Importance= 2   
myCDONTSMail.Send sFrom, sTo, sSubject, sBody   
If err.num <> 0 Then     
Response.Write " CDONTS Error: "  & err.num & "  - "  & err.description   
End If 
Set myCdontsMail= Nothing 

	Response.Write " <html>"  & vbCrLf
	Response.Write " <head>"  & vbCrLf
	Response.Write " <meta  http-equiv=" " Content-Type" "  content="  & szCharSet & " >"  & vbCrLf
	Response.Write " <title> "  & szTitle & " </title>"  & vbCrLf
	Response.Write " </head>"  & vbCrLf
	Response.Write " <body>"  & vbCrLf
	Response.Write " <h1> "  & szTitle & " </h1>"  & vbCrLf
	Response.Write " <p> "  & szMsg1 &" </p>"  & vbCrLf
	Response.Write " <p>"  & vbCrLf
	For Each item in Request.Form 
		If item <> " VTI-GROUP"  Then
			Response.Write " <b>"  & item & " </b>"  & " : "  & Server.HTMLEncode(Request.Form(item)) & " <BR>"  & vbCrLf
		End If
	Next 
	Response.Write " </p>"  & vbCrLf
	Response.Write " <p> <a href=" " "  &  szUrl & " " " >"  & szMsg2 & " </a></p>"  & vbCrLf
	Response.Write " </body>"  & vbCrLf
	Response.Write " </html>"  & vbCrLf
	Response.End
End Function


I' m going to edit out the Dims now and revert it back to Spooky' s model... any other suggestions? :P

-Chad




Valaire -> RE: Email Confirmation + Database (8/9/2002 15:35:20)

Tried this with no luck either...

Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)

Dim myCDONTSMail
Set myCDONTSMail= Server.CreateObject(" CDONTS.NewMail" )   
	myCDONTSMail.From = " apx@apxonline.com" 
	myCDONTSMail.To = " apxonline.com" 
	myCDONTSMail.Subject = " APXOnline Inquiry Submission" 
	myCDONTSMail.Body = Request.Form(" Name" ) & " ' s inquiry has been added to the "  & Request.Form(" Form_Type" ) & " database." 

	myCDONTSMail.BodyFormat= 1   
	myCDONTSMail.MailFormat= 0   
	myCDONTSMail.Importance= 2   

myCDONTSMail.Send 
Set myCDONTSMail= Nothing 


I' m rambling at this point but I' m at a lost, and considering annoying my host and asking him if he' s -really- sure it' s configured correctly, but I want to make sure it' s not on my end...

Thanks.




KeithG -> RE: Email Confirmation + Database (8/9/2002 16:10:24)

I did notice that in your last example you were using the Server.CreateObject vs mine with just CreateObject, maybe your host does not support that?

Set MyCDONTSMail = CreateObject(" CDONTS.NewMail" )

Set myCDONTSMail= Server.CreateObject(" CDONTS.NewMail" )




Valaire -> RE: Email Confirmation + Database (8/9/2002 16:15:54)

I think it' s implicit, and I just got it off an example from a website. I' ve tried it both ways anyway. :> Keen eyes though!

- Chad




KeithG -> RE: Email Confirmation + Database (8/9/2002 16:17:01)

At this point I would suspect the server settings.




no_mac_jack -> RE: Email Confirmation + Database (8/9/2002 23:18:12)

I' d have to agree with Keith if none of these are working.

So when you sent an e-mail thru the Spooky Login, (using CDONTS) did it work? I think I already asked this, but I' m not exactly clear on what the answer was.

Something' s awry either way. [:@]

~no_mac_jack




Valaire -> RE: Email Confirmation + Database (8/10/2002 13:12:22)

Okay I sent a test mail from the admin page of the Spooky Login using CDONTS and it worked fine, and sent it to my home address, valaire@optonline.net...

So... I think it' s configured correctly. [:(]




Valaire -> RE: Email Confirmation + Database (8/10/2002 13:28:45)

I changed the admin email address to the address I' m trying to send the database submission to, and CDONTS sends it fine also, so I think there is maybe a problem with my actual forms.... here' s the code for one of them (of 3)...

<%
'  FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.
On Error Resume Next

strErrorUrl = " " 

If Request.ServerVariables(" REQUEST_METHOD" ) = " POST"  Then
If Request.Form(" VTI-GROUP" ) = " 0"  Then
	Err.Clear

	Set fp_conn =  Server.CreateObject(" ADODB.Connection" )
	FP_DumpError strErrorUrl, " Cannot create connection" 

	Set fp_rs = Server.CreateObject(" ADODB.Recordset" )
	FP_DumpError strErrorUrl, " Cannot create record set" 

	fp_conn.Open Application(" Inquiry_ConnectionString" )
	FP_DumpError strErrorUrl, " Cannot open database" 

	fp_rs.Open " External" , fp_conn, 1, 3, 2 '  adOpenKeySet, adLockOptimistic, adCmdTable
	FP_DumpError strErrorUrl, " Cannot open record set" 

	fp_rs.AddNew
	FP_DumpError strErrorUrl, " Cannot add new record set to the database" 
	Dim arFormFields0(46)
	Dim arFormDBFields0(46)
	Dim arFormValues0(46)

	arFormFields0(0) = " Environmental_Conditions" 
	arFormDBFields0(0) = " Environmental Conditions" 
	arFormValues0(0) = Request(" Environmental_Conditions" )
	arFormFields0(1) = " Primary_1_Input_Voltage" 
	arFormDBFields0(1) = " P1 Input Volt" 
	arFormValues0(1) = Request(" Primary_1_Input_Voltage" )
	arFormFields0(2) = " VPP" 
	arFormDBFields0(2) = " VPP" 
	arFormValues0(2) = Request(" VPP" )
	arFormFields0(3) = " Secondary_1_Output_Voltage" 
	arFormDBFields0(3) = " S1 Output Volt" 
	arFormValues0(3) = Request(" Secondary_1_Output_Voltage" )
	arFormFields0(4) = " Application" 
	arFormDBFields0(4) = " Application" 
	arFormValues0(4) = Request(" Application" )
	arFormFields0(5) = " Unit" 
	arFormDBFields0(5) = " Unit" 
	arFormValues0(5) = Request(" Unit" )
	arFormFields0(6) = " Width" 
	arFormDBFields0(6) = " Width" 
	arFormValues0(6) = Request(" Width" )
	arFormFields0(7) = " Secondary_1_Output_Current" 
	arFormDBFields0(7) = " S1 Output Current" 
	arFormValues0(7) = Request(" Secondary_1_Output_Current" )
	arFormFields0(8) = " Quantity" 
	arFormDBFields0(8) = " Quantity" 
	arFormValues0(8) = Request(" Quantity" )
	arFormFields0(9) = " Ripple_Max" 
	arFormDBFields0(9) = " Ripple Max" 
	arFormValues0(9) = Request(" Ripple_Max" )
	arFormFields0(10) = " When_Needed" 
	arFormDBFields0(10) = " When Needed" 
	arFormValues0(10) = Request(" When_Needed" )
	arFormFields0(11) = " Title" 
	arFormDBFields0(11) = " Title" 
	arFormValues0(11) = Request(" Title" )
	arFormFields0(12) = " Overall" 
	arFormDBFields0(12) = " Overall" 
	arFormValues0(12) = Request(" Overall" )
	arFormFields0(13) = " Class" 
	arFormDBFields0(13) = " Class" 
	arFormValues0(13) = Request(" Class" )
	arFormFields0(14) = " Height" 
	arFormDBFields0(14) = " Height" 
	arFormValues0(14) = Request(" Height" )
	arFormFields0(15) = " Secondary_2_Output_Voltage" 
	arFormDBFields0(15) = " S2 Output Volt" 
	arFormValues0(15) = Request(" Secondary_2_Output_Voltage" )
	arFormFields0(16) = " Output_Connector_Type" 
	arFormDBFields0(16) = " Output Connector Type" 
	arFormValues0(16) = Request(" Output_Connector_Type" )
	arFormFields0(17) = " Length" 
	arFormDBFields0(17) = " Length" 
	arFormValues0(17) = Request(" Length" )
	arFormFields0(18) = " Secondary_2_Minimum_Load" 
	arFormDBFields0(18) = " S2 Min Load" 
	arFormValues0(18) = Request(" Secondary_2_Minimum_Load" )
	arFormFields0(19) = " Secondary_2_Output_Current" 
	arFormDBFields0(19) = " S2 Output Current" 
	arFormValues0(19) = Request(" Secondary_2_Output_Current" )
	arFormFields0(20) = " Secondary_1_Minimum_Load" 
	arFormDBFields0(20) = " S1 Min Load" 
	arFormValues0(20) = Request(" Secondary_1_Minimum_Load" )
	arFormFields0(21) = " Company" 
	arFormDBFields0(21) = " Company" 
	arFormValues0(21) = Request(" Company" )
	arFormFields0(22) = " Secondary_3_Minimum_Load" 
	arFormDBFields0(22) = " S3 Min Load" 
	arFormValues0(22) = Request(" Secondary_3_Minimum_Load" )
	arFormFields0(23) = " Secondary_4_Minimum_Load" 
	arFormDBFields0(23) = " S4 Min Load" 
	arFormValues0(23) = Request(" Secondary_4_Minimum_Load" )
	arFormFields0(24) = " Primary_2_Min" 
	arFormDBFields0(24) = " P2 Min Volt" 
	arFormValues0(24) = Request(" Primary_2_Min" )
	arFormFields0(25) = " Fax" 
	arFormDBFields0(25) = " Fax" 
	arFormValues0(25) = Request(" Fax" )
	arFormFields0(26) = " Primary_2_Max" 
	arFormDBFields0(26) = " P2 Max Volt" 
	arFormValues0(26) = Request(" Primary_2_Max" )
	arFormFields0(27) = " Secondary_3_Output_Voltage" 
	arFormDBFields0(27) = " S3 Output Volt" 
	arFormValues0(27) = Request(" Secondary_3_Output_Voltage" )
	arFormFields0(28) = " Contact" 
	arFormDBFields0(28) = " Contact" 
	arFormValues0(28) = Request(" Contact" )
	arFormFields0(29) = " City" 
	arFormDBFields0(29) = " City" 
	arFormValues0(29) = Request(" City" )
	arFormFields0(30) = " Email" 
	arFormDBFields0(30) = " Email" 
	arFormValues0(30) = Request(" Email" )
	arFormFields0(31) = " Safety_Agency_Requirements" 
	arFormDBFields0(31) = " Safety Agency Reqs" 
	arFormValues0(31) = Request(" Safety_Agency_Requirements" )
	arFormFields0(32) = " Configuration" 
	arFormDBFields0(32) = " Configuration" 
	arFormValues0(32) = Request(" Configuration" )
	arFormFields0(33) = " Secondary_3_Output_Current" 
	arFormDBFields0(33) = " S3 Output Current" 
	arFormValues0(33) = Request(" Secondary_3_Output_Current" )
	arFormFields0(34) = " Phone" 
	arFormDBFields0(34) = " Phone" 
	arFormValues0(34) = Request(" Phone" )
	arFormFields0(35) = " Name" 
	arFormDBFields0(35) = " Name" 
	arFormValues0(35) = Request(" Name" )
	arFormFields0(36) = " Zip" 
	arFormDBFields0(36) = " Zip" 
	arFormValues0(36) = Request(" Zip" )
	arFormFields0(37) = " Primary_I_Input_Frequency" 
	arFormDBFields0(37) = " P1 Input Freq" 
	arFormValues0(37) = Request(" Primary_I_Input_Frequency" )
	arFormFields0(38) = " Notes" 
	arFormDBFields0(38) = " Notes" 
	arFormValues0(38) = Request(" Notes" )
	arFormFields0(39) = " Secondary_4_Output_Voltage" 
	arFormDBFields0(39) = " S4 Output Volt" 
	arFormValues0(39) = Request(" Secondary_4_Output_Voltage" )
	arFormFields0(40) = " Form_Type" 
	arFormDBFields0(40) = " Form Type" 
	arFormValues0(40) = Request(" Form_Type" )
	arFormFields0(41) = " Secondary_4_Output_Current" 
	arFormDBFields0(41) = " S4 Output Current" 
	arFormValues0(41) = Request(" Secondary_4_Output_Current" )
	arFormFields0(42) = " New_or_Existing" 
	arFormDBFields0(42) = " New or Existing" 
	arFormValues0(42) = Request(" New_or_Existing" )
	arFormFields0(43) = " Country" 
	arFormDBFields0(43) = " Country" 
	arFormValues0(43) = Request(" Country" )
	arFormFields0(44) = " State" 
	arFormDBFields0(44) = " State" 
	arFormValues0(44) = Request(" State" )
	arFormFields0(45) = " Address" 
	arFormDBFields0(45) = " Address" 
	arFormValues0(45) = Request(" Address" )

	FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0

	FP_SaveFieldToDB fp_rs, Now, " Timestamp" 

	fp_rs.Update
	FP_DumpError strErrorUrl, " Cannot update the database" 

	fp_rs.Close
	fp_conn.Close

	Session(" FP_SavedFields" )=arFormFields0
	Session(" FP_SavedValues" )=arFormValues0
	Response.Redirect " confirmation.asp" 

End If
End If

%>
<html>

<head>
<meta http-equiv=" Content-Type"  content=" text/html; charset=iso-8859-1" >
<title>External and Open Frame Power Supply Inquiry </title>
</head>

<body bgcolor=" #000000"  text=" #FFFFCC"  link=" #008000"  vlink=" #008000"  alink=" #008080"  background=" ../Images/Backgrounds/blue.jpg" >

<form method=" POST"  action=" --WEBBOT-SELF--"  onsubmit=" return FrontPage_Form1_Validator(this)"  name=" FrontPage_Form1" >
  <!--webbot bot=" SaveDatabase"  suggestedext=" asp"  u-asp-include-url=" ../_fpclass/fpdbform.inc"  s-dataconnection=" Inquiry"  s-recordsource=" External"  u-database-url=" ../fpdb/inquiry.mdb"  u-confirmation-url=" confirmation.asp"  s-builtin-fields=" Timestamp"  s-builtin-dbfields=" Timestamp"  s-form-fields=" Environmental_Conditions Primary_1_Input_Voltage VPP Secondary_1_Output_Voltage Application Unit Width Secondary_1_Output_Current Quantity Ripple_Max When_Needed Title Overall Class Height Secondary_2_Output_Voltage Output_Connector_Type Length Secondary_2_Minimum_Load Secondary_2_Output_Current Secondary_1_Minimum_Load Company Secondary_3_Minimum_Load Secondary_4_Minimum_Load Primary_2_Min Fax Primary_2_Max Secondary_3_Output_Voltage Contact City Email Safety_Agency_Requirements Configuration Secondary_3_Output_Current Phone Name Zip Primary_I_Input_Frequency Notes Secondary_4_Output_Voltage Form_Type Secondary_4_Output_Current New_or_Existing Country State Address"  s-form-dbfields=" Environmental\ Conditions P1\ Input\ Volt VPP S1\ Output\ Volt Application Unit Width S1\ Output\ Current Quantity Ripple\ Max When\ Needed Title Overall Class Height S2\ Output\ Volt Output\ Connector\ Type Length S2\ Min\ Load S2\ Output\ Current S1\ Min\ Load Company S3\ Min\ Load S4\ Min\ Load P2\ Min\ Volt Fax P2\ Max\ Volt S3\ Output\ Volt Contact City Email Safety\ Agency\ Reqs Configuration S3\ Output\ Current Phone Name Zip P1\ Input\ Freq Notes S4\ Output\ Volt Form\ Type S4\ Output\ Current New\ or\ Existing Country State Address"  startspan --><input TYPE=" hidden"  NAME=" VTI-GROUP"  VALUE=" 0" ><!--#include file=" ../_fpclass/fpdbform.inc" --><!--webbot bot=" SaveDatabase"  endspan i-checksum=" 34604"  --><p>
  <font size=" 4"  color=" #FFFF00" >CONTACT INFORMATION</font></p>
  <table border=" 0"  width=" 534"  height=" 145"  style=" border-collapse: collapse"  cellpadding=" 0"  cellspacing=" 0" >
    <tr>
      <td width=" 99"  align=" right"  height=" 25" ><font face=" Arial"  size=" 2" ><b>Name    </b></font></td>
      <td width=" 151"  height=" 25" ><font face=" Arial"  size=" 2" >
      <!--webbot bot=" Validation"  s-data-type=" String"  b-allow-letters=" TRUE"  b-allow-whitespace=" TRUE"  b-value-required=" TRUE"  i-minimum-length=" 1"  --><input type=" text"  name=" Name"  size=" 20"  tabindex=" 1" ></font></td>
      <td width=" 109"  align=" right"  nowrap height=" 25" ><font face=" Arial"  size=" 2" ><b>Title    </b></font></td>
      <td nowrap height=" 25"  width=" 165"  colspan=" 3" ><font face=" Arial"  size=" 2" >
      <!--webbot bot=" Validation"  s-data-type=" String"  b-allow-letters=" TRUE"  b-allow-whitespace=" TRUE"  b-value-required=" TRUE"  i-minimum-length=" 1"  --><input type=" text"  name=" Title"  size=" 20"  tabindex=" 2" ></font></td>
    </tr>
    <tr>
      <td width=" 99"  align=" right"  height=" 13" ><font face=" Arial"  size=" 2" ><b>
      Company    </b></font></td>
      <td width=" 151"  height=" 13" ><font face=" Arial"  size=" 2" >
      <!--webbot bot=" Validation"  b-value-required=" TRUE"  i-minimum-length=" 1"  --><input type=" text"  name=" Company"  size=" 20"  tabindex=" 3" ></font></td>
      <td width=" 109"  align=" right"  height=" 13" ><font face=" Arial"  size=" 2" ><b>
      Address    </b></font></td>
      <td height=" 13"  width=" 165"  colspan=" 3" ><font face=" Arial"  size=" 2" >
      <!--webbot bot=" Validation"  b-value-required=" TRUE"  i-minimum-length=" 1"  --><input type=" text"  name=" Address"  size=" 20"  tabindex=" 4" ></font></td>
    </tr>
    <tr>
      <td width=" 99"  align=" right"  height=" 12" ><font face=" Arial"  size=" 2" ><b>
      City    </b></font></td>
      <td width=" 151"  height=" 12" ><font face=" Arial"  size=" 2" >
      <!--webbot bot=" Validation"  b-value-required=" TRUE"  i-minimum-length=" 1"  --><input type=" text"  name=" City"  size=" 20"  tabindex=" 5" ></font></td>
      <td width=" 109"  align=" right"  height=" 12" ><font face=" Arial"  size=" 2" ><b>
      State    </b></font></td>
      <td height=" 12"  width=" 59" ><font face=" Arial"  size=" 2" >
      <!--webbot bot=" Validation"  s-data-type=" String"  b-allow-letters=" TRUE"  b-value-required=" TRUE"  i-minimum-length=" 2"  i-maximum-length=" 2"  --><input type=" text"  name=" State"  size=" 3"  tabindex=" 6"  maxlength=" 2" ><b>  </b></font></td>
      <td height=" 12"  width=" 39" ><b>Zip</b></td>
      <td height=" 12"  width=" 67" ><font face=" Arial"  size=" 2" >
      <!--webbot bot=" Validation"  s-data-type=" Integer"  s-number-separators=" x"  b-value-required=" TRUE"  i-minimum-length=" 5"  --><input name=" Zip"  size=" 7"  tabindex=" 7"  style=" float: right" ></font></td>
    </tr>
    <tr>
      <td width=" 99"  align=" right"  height=" 25" ><font face=" Arial"  size=" 2" ><b>  
      Country    </b></font></td>
      <td width=" 151"  height=" 25" >
      <!--webbot bot=" Validation"  b-value-required=" TRUE"  i-minimum-length=" 1"  --><input type=" text"  name=" Country"  size=" 20"  tabindex=" 8" ></td>
      <td width=" 109"  align=" right"  height=" 25" ><font face=" Arial"  size=" 2" ><b>
      Phone    </b></font></td>
      <td height=" 25"  width=" 165"  colspan=" 3" ><font face=" Arial"  size=" 2" >
      <!--webbot bot=" Validation"  b-value-required=" TRUE"  i-minimum-length=" 1"  --><input type=" text"  name=" Phone"  size=" 20"  tabindex=" 9" ></font></td>
    </tr>
    <tr>
      <td width=" 99"  align=" right"  height=" 25" ><font face=" Arial"  size=" 2" ><b>
      Fax    </b></font></td>
      <td width=" 151"  height=" 25" ><font face=" Arial"  size=" 2" >
      <input type=" text"  name=" Fax"  size=" 20"  tabindex=" 10" ></font></td>
      <td width=" 109"  align=" right"  height=" 25" ><font face=" Arial"  size=" 2" ><b>
      E-mail    </b></font></td>
      <td height=" 25"  width=" 165"  colspan=" 3" ><font face=" Arial"  size=" 2" >
      <!--webbot bot=" Validation"  b-value-required=" TRUE"  i-minimum-length=" 1"  --><input type=" text"  name=" Email"  size=" 20"  tabindex=" 11" ></font></td>
    </tr>
    </table> 
    <table border=" 0"  width=" 594" >
      <tr>
        <td width=" 141"  align=" right"  height=" 21" >
  <font face=" Arial"  size=" 2" ><b>Project:</b></font>
        </td>
        <td width=" 141"  align=" left"  height=" 21" ><font face=" Arial"  size=" 2" >
        <!--webbot bot=" Validation"  b-value-required=" TRUE"  --><input type=" radio"  value=" New"  name=" New_or_Existing"  tabindex=" 12" > 
          New
      Product</font></td>
        <td width=" 289"  align=" left"  nowrap height=" 21"  colspan=" 2" >
  <font face=" Arial"  size=" 2" >
  <input type=" radio"  value=" Existing"  name=" New_or_Existing"  tabindex=" 12" > 
  Existing Product</font>
        </td>
      </tr>
      <tr>
        <td width=" 123"  align=" right"  height=" 21" >
  <font face=" Arial"  size=" 2" ><b>When
        Needed:</b> </font>
        </td>
        <td width=" 141"  align=" left"  height=" 21" ><font face=" Arial"  size=" 2" >
        <!--webbot bot=" Validation"  b-value-required=" TRUE"  --><input type=" radio"  value=" Immediately"  name=" When_Needed"  tabindex=" 13" > 
          Immediately</font></td>
        <td width=" 177"  align=" left"  height=" 21" >
  <font face=" Arial"  size=" 2" >
  <input type=" radio"  value=" 3_to_6_Months"  name=" When_Needed"  tabindex=" 13" > 
  3 to 6 Months</font>
        </td>
        <td width=" 151"  align=" left"  height=" 21" ><font face=" Arial"  size=" 2" >
        <input type=" radio"  value=" 6_to_12_Months"  name=" When_Needed"  tabindex=" 13" > 
          6 to 12 Months</font></td>
      </tr>
      <tr>
        <td width=" 123"  align=" right"  height=" 21" ><font face=" Arial"  size=" 2" ><b>Contact:</b> </font>
        </td>
        <td width=" 141"  align=" left"  height=" 21" ><font face=" Arial"  size=" 2" >
        <!--webbot bot=" Validation"  b-value-required=" TRUE"  --><input type=" radio"  value=" Phone"  name=" Contact"  tabindex=" 13" > 
          Call
      Me</font></td>
        <td width=" 177"  align=" left"  height=" 21" ><font face=" Arial"  size=" 2" >
        <input type=" radio"  value=" Fax"  name=" Contact"  tabindex=" 13" > 
          Fax
      Me</font>
        </td>
        <td width=" 151"  align=" left"  height=" 21" ><font face=" Arial"  size=" 2" >
        <input type=" radio"  value=" E-mail"  name=" Contact"  tabindex=" 13" > 
          E-mail 
      Me</font>
        </td>
      </tr>
    </table>
  <p><font color=" #FFFF00"  size=" 4" >TECHNICAL INFORMATION</font><strong><font face=" Arial"  size=" 2" ><br>
  <br>
  1) <u>ELECTRICAL</u></font></strong> </p>
  <div align=" left" ><table border=" 0"  width=" 633" >
    <tr>
      <td nowrap width=" 312" ><strong><font face=" Arial"  size=" 2" >      
        Input:</font></strong></td>
      <td nowrap width=" 374" ><strong><font face=" Arial"  size=" 2" >Output: </font></strong></td>
    </tr>
    <tr>
      <td nowrap width=" 312" ><font face=" Arial"  size=" 2" >      
        1.  
      <input type=" text"  name=" Primary_1_Input_Voltage"  size=" 5"  tabindex=" 14" >
        V @ 
      <input type=" text"  name=" Primary_I_Input_Frequency"  size=" 8"  tabindex=" 15" > 
      Hz</font></td>
      <td nowrap width=" 374" ><font face=" Arial"  size=" 1" >
      <input type=" radio"  name=" Class"  value=" VAC"  tabindex=" 18" >  VAC  
      <input type=" radio"  name=" Class"  value=" VDC"  tabindex=" 18" >  VDC  
      <input type=" radio"  name=" Class"  value=" DC"  tabindex=" 18" >  Reg. DC  
      <input type=" radio"  name=" Class"  value=" Switchmode"  tabindex=" 18" >  Switchmode</font></td>
    </tr>
    <tr>
      <td nowrap width=" 312" ><font face=" Arial"  size=" 2" ><b>Or:</b>  2.  
      <input type=" text"  name=" Primary_2_Min"  size=" 5"  tabindex=" 16" > to 
      <input type=" text"  name=" Primary_2_Max"  size=" 8"  tabindex=" 17" > V <i>
      (Universal)</i></font></td>
      <td nowrap width=" 374" ><font face=" Arial"  size=" 2" >1.  
      <input type=" text"  name=" Secondary_1_Output_Voltage"  size=" 6"  tabindex=" 19" > V @ 
      <input type=" text"  name=" Secondary_1_Output_Current"  size=" 6"  tabindex=" 20" > mA 
      <input type=" text"  name=" Secondary_1_Minimum_Load"  size=" 6"  tabindex=" 21" >
        min.load </font></td>
    </tr>
    <tr>
      <td nowrap width=" 312" ></td>
      <td nowrap width=" 374" ><font face=" Arial"  size=" 2" >2.  
      <input type=" text"  name=" Secondary_2_Output_Voltage"  size=" 6"  tabindex=" 22" > V @ 
      <input type=" text"  name=" Secondary_2_Output_Current"  size=" 6"  tabindex=" 23" > mA 
      <input type=" text"  name=" Secondary_2_Minimum_Load"  size=" 6"  tabindex=" 24" > min.load </font></td>
    </tr>
    <tr>
      <td nowrap width=" 312" ></td>
      <td nowrap width=" 374" ><font face=" Arial"  size=" 2" >3.  
      <input type=" text"  name=" Secondary_3_Output_Voltage"  size=" 6"  tabindex=" 25" > V @ 
      <input type=" text"  name=" Secondary_3_Output_Current"  size=" 6"  tabindex=" 26" > mA 
      <input type=" text"  name=" Secondary_3_Minimum_Load"  size=" 6"  tabindex=" 27" > min.load </font></td>
    </tr>
    <tr>
      <td nowrap width=" 312" > </td>
      <td nowrap width=" 374" ><font face=" Arial"  size=" 2" >4.  
      <input type=" text"  name=" Secondary_4_Output_Voltage"  size=" 6"  tabindex=" 28" > V @ 
      <input type=" text"  name=" Secondary_4_Output_Current"  size=" 6"  tabindex=" 29" > mA 
      <input type=" text"  name=" Secondary_4_Minimum_Load"  size=" 6"  tabindex=" 30" > min.load </font></td>
    </tr>
  </table>
  </div><p>
  <font face=" Arial"  size=" 2" ><b>For DC Output:</b>    <b><br>
  <br>
  Ripple Max:</b>   
  <input type=" text"  name=" Ripple_Max"  size=" 6"  tabindex=" 31" > Vpp   <b>For Regulated Output:   </b>
  <input type=" text"  name=" Overall"  size=" 3"  tabindex=" 32" > % Overall  
  <b>Noise:   </b>
  <input type=" text"  name=" VPP"  size=" 6"  tabindex=" 33" > Vpp<br>
  <br>
  <strong>2) <u>MECHANICAL</u></strong></font> </p>
  <p><font face=" Arial"  size=" 2" ><b>Configuration:   </b>
  <input type=" radio"  value=" Wall_Plug-in"  name=" Configuration"  tabindex=" 34" >  Wall Plug-In</font>  
  <font face=" Arial"  size=" 2" >
  <input type=" radio"  value=" Desktop"  name=" Configuration"  tabindex=" 34" >  Desktop</font>   <font face=" Arial"  size=" 2" >
  <input type=" radio"  value=" Open_Frame"  name=" Configuration"  tabindex=" 34" >  
  Open Frame<br>
  <b>Critical Dimensions:</b></font>   <font face=" Arial"  size=" 2" >L:   
  <input type=" text"  name=" Length"  size=" 6"  tabindex=" 35" ></font>   <font face=" Arial"  size=" 2" >W:   
  <input type=" text"  name=" Width"  size=" 6"  tabindex=" 36" ></font>  
  <font face=" Arial"  size=" 2" >H:   
  <input type=" text"  name=" Height"  size=" 6"  tabindex=" 37" >   <b>Units: </b>  
  <input type=" radio"  name=" Unit"  value=" Inches"  tabindex=" 38" > 
  inch   
  <input type=" radio"  name=" Unit"  value=" Millimeters"  tabindex=" 38" > mm<br>
  <b>Output Connector Type:   </b>
  <input type=" text"  name=" Output_Connector_Type"  size=" 46"  tabindex=" 39" ></font></p>
  <p><font size=" 4"  color=" #FFFF00" >GENERAL INFORMATION</font></p>
  <p><font face=" Arial"  size=" 2" >
  <b>Application:</b>  
  <input type=" text"  name=" Application"  size=" 38"  tabindex=" 40" >  
  <b>Quantity: </b> <!--webbot bot=" Validation"  s-display-name=" Quantity"  s-data-type=" Integer"  s-number-separators=" ,"  --><input type=" text"  name=" Quantity"  size=" 9"  tabindex=" 41" ><br>
  <b>Safety Agency Reqs:</b>  
  <input type=" text"  name=" Safety_Agency_Requirements"  size=" 57"  tabindex=" 42" ><br>
  <b>Environmental Conditions:</b>  
  <input type=" text"  name=" Environmental_Conditions"  size=" 52"  tabindex=" 43" ></font></p>
  <table border=" 0"  cellpadding=" 0"  cellspacing=" 0"  style=" border-collapse: collapse"  width=" 65%" >
    <tr>
      <td width=" 13%" >
      <p align=" right" ><font face=" Arial"  size=" 2" >
  <b>Notes:    </b></font></td>
      <td width=" 87%" ><textarea rows=" 4"  name=" Notes"  cols=" 53"  tabindex=" 44" ></textarea></td>
    </tr>
  </table>
  <div align=" center" ><p align=" left" ><font face=" Arial"  size=" 2" >                                                    
    <input type=" submit"  value=" Submit"  name=" Submit"  tabindex=" 45" >   
    <input type=" reset"  value=" Clear"  name=" Clear"  tabindex=" 46" ></font></p>
  </div><p> </p>
  <input type=" hidden"  name=" Form_Type"  value=" External" >
</form>

<p> </p>
</body>
</html>


It can be viewed at www.apxonline.com/Inquiry/externalpower.asp

If anyone has any ideas, please let me know... Thanks.




Valaire -> RE: Email Confirmation + Database (8/10/2002 13:43:43)

I' d like to make a public outfront declaration:

I FIXED IT.... MWAHAHAHAHA.

25 posts later.... I figured out that I was using a custom
confirmation page and the whole point of changing the
FP Confirmation function was that it was using frontpage' s confirmation...
so I changed it back to the ugly one and it
worked fine. Now I have to make it look nice...but anyway...
I' m an idiot so I apologize for wasting everyone' s time.

Looking back though, these are the memories that define us. [:D]

Thanks for all your help.

-Chad




no_mac_jack -> RE: Email Confirmation + Database (8/10/2002 14:05:23)

lol! Good to hear. Kept us all thinking, anyway, huh? [8D]

~no_mac_jack




ohioholiday -> RE: Email Confirmation + Database (8/18/2004 20:03:27)

Please help. I'm trying to get an ASP page that already updates to an Access database to email some type of notification to the office. It can be in a form of a button, it doesn't have to be automatic. I would like to email the hyperlink to the last updated record.

I've followed the tutorial on how to get the last id of the record updated. Now, how can I use that to email a confirmation with the hyperlink query to an email address?

Can I make a custom confirmation page or insert something that prompts the user to email update at a confirmation page without going thru the large amount of CDO scripting?

Or, if nothing else - if I get everything else done on my site, are there any suggestions on contracting the email part out to someone else? This really needs to be done quickly.

Thanks -
newbie to the forum - (which has been a lifesaver on so many issues) [8|]




BeTheBall -> RE: Email Confirmation + Database (8/18/2004 22:32:35)

Welcome. See if this thread helps you any:

http://www.frontpagewebmaster.com/m_184721/key_cdonts/tm.htm#184996

If not, I suggest you begin a new thread. Sometimes resurrecting an old thread like this does draw as much attention as a new one.




Valaire -> RE: Email Confirmation + Database (8/19/2004 1:43:19)

On the confirmation page that updates the Access database, you can use ASP scripting to create a CDONTS (or CDOSYS on Windows 2003) object to e-mail information, including a hyperlink to the record ID that was just inserted.

It's not that much scripting and AFAIK that is the easiest way to go about it.

This guide details the info on setting up the script using CDOSYS:

http://quadcomm.com/tips/sendCDOSYSmail.asp




Page: [1] 2   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.15625