|
| |
|
|
mtee55
Posts: 55 Joined: 7/14/2005 Status: offline
|
Results to DB and Email-- REVISITED ! - 8/25/2005 9:52:21
I have seen so much about emailing results and results to database AND emailing. I am getting dizzy !!! Most of it is over my head. I am trying to send my results from a form to database and email at the same time. I have no problem sending to database. Also, no problem sending to email but can only do one at a time. I am running a Windows 2003 Web Server. Everything is working great. I tested my SMTP via telnet and was able to send myself an email through port 25. Here's my plea for help: Is there some kind of simple (because I am) way/script, etc that I can use to email the results of a form while at the same time continuing to post to a database ? I have seen some stuff on this site but don't seem to be able to locate the scripts again. I don't have any money to spend on any third party programs so it is just a "script and I" type of thing. I would REALLY appreciate any help. This is the last task for an online maintenance request web site with multiple pages depending on the type of maint. for our Fire Department before I go live with it. Thank you, Thank you, Thank you. Mike
< Message edited by mtee55 -- 8/25/2005 13:03:58 >
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/25/2005 10:57:53
What script did you use to send the test email? What about your database insert, are you using pure ASP or Frontpage?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
mtee55
Posts: 55 Joined: 7/14/2005 Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/25/2005 11:28:55
I used Microsoft's article KB323350 to test SMTP services manually in Windows Server 2003. You actually telnet into the server and open port 25 and send an email. I am using Frontpage 2003 and creating asp forms in it. Thanks, Mike
|
|
|
|
mtee55
Posts: 55 Joined: 7/14/2005 Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/25/2005 15:16:08
Continuing to tinker.... I have been able to send email from an .asp page using CDOSYS and the following script: <% Dim sMsg Dim sTo Dim sFrom Dim sSubject Dim sTextBody sTo = "myname@mymail.org" sFrom = "Email@mymail.web01.org" sSubject = "Web Page Send" sTextBody = "Test from testemail.asp" Dim objMail 'Create the mail object Set objMail = Server.CreateObject("CDO.Message") 'Set key properties objMail.From = sFrom objMail.To = sTo objMail.Subject= sSubject objMail.TextBody = sTextBody 'Send the email objMail.Send 'Clean-up mail object Set objMail = Nothing %> I just need to figure out how to send results from a form submit now. Thanks anyone. Mike
|
|
|
|
mtee55
Posts: 55 Joined: 7/14/2005 Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/25/2005 16:28:01
Thanks. Question: do I replace the "form method" section with this ? Or do I add it somewhere on page1.asp ? I'm talking about the first section of code you showed me. Mike
|
|
|
|
mtee55
Posts: 55 Joined: 7/14/2005 Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/25/2005 16:39:46
I'm afraid this answer will probably sound stoopid but here goes: frontpage 2003 form on asp page submit to access database via submit button I am wanting to email the data that was submitted as it would appear on the results.asp page.
|
|
|
|
mtee55
Posts: 55 Joined: 7/14/2005 Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/25/2005 17:02:04
Yes. The submit to database option in frontpage '03. My biggest problem (I hope) was getting email to work from my webserver and then actually get an email to send from a webpage as the page was accessed. This tells me that part of this task is working okay. What I need to do is when a form is submitted, to send the contents of the form to a specific email recipient in addition to the database submit. It would go to a different person depending on the form that was submitted. Each webpage has only one form on it. I am learning so much from this forum but I know that I don't know hardly anything. I appreciate your help Spooky. My exerience has been over 15 years of end user support/helpdesk so this is all real new. Thanks, Mike
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/26/2005 12:45:46
This help any? http://www.frontpagewebmaster.com/m-141000/key-cdonts%252Cdatabase/tm.htm#141000
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
mtee55
Posts: 55 Joined: 7/14/2005 Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/26/2005 14:15:40
That confused me a bit. Any idea what the following line for CDONTS would be for CDOSYS ? strBody = strBody & item & ": " & FP_SavedFields(Description) & VbCrLf or just the complete script. I truly am ignorant and getting more confused as I go. This is for a script on a custom confirmation page to email desired fields to an email address. Thanks, Mike
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/26/2005 19:30:57
Take your working CDOSYS script and place it right after this line: Session(" FP_SavedValues" )=arFormValues0
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
mtee55
Posts: 55 Joined: 7/14/2005 Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/31/2005 10:16:09
My confirmation.asp page doesn't have any Session information on it. just the script to send the email. mike
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/31/2005 10:47:49
The email script needs to go on the same page as the submission form, not on the confirmation page. The link I provided should show you exactly where on the page to insert the email script.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
mtee55
Posts: 55 Joined: 7/14/2005 Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/31/2005 11:36:20
Thanks, I had tried that but got an error so thought that since this was a script in it's own right, that it had to go somewhere else. Sorry.
|
|
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
RE: Results to DB and Email-- REVISITED ! - 8/31/2005 21:59:00
I use a form on page 1 that submits to a drw on page 2, The drw inserts the record into the database and then I also use the email script below the drw and it works great. I l;earned it from http://frontpagehowto.com/dbandemail.htm
|
|
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
|
|
|