Forums

This topic is locked

send form to access databse and email, cdont

Posted 13 Sep 2002 23:14:21
1
has voted
13 Sep 2002 23:14:21 John Blakeslee posted:
Hello,
I am trying to figure out how to send a from that someone fills out to my database as well as to my email account.
Right now I have it so the information goes into the database, it also sends an email to my account, but the email does not contain the information that people fill out with the form, the database get all the info fine, just the email that doesnt.

Any help would be appreciated.

Replies

Replied 14 Sep 2002 19:20:46
14 Sep 2002 19:20:46 Dave Clarke replied:

You need to set variables on the page that sends the mail , that correspond to the form fields that you want to recieve.
example:-

firstname = request.querystring("newfirstname"
lastname = request.querystring("newlastname"
emailadd = request.querystring("newemailaddress"
username = request.querystring("newusername"
password = request.querystring("newpassword"

and then put these variables in the mail code, example using jmail(never used cdonts)

JMail.Body = "Hello" & tab2 & <b>firstname</b> & tab2 & <b>lastname</b> & "Welcome To blah blah blah"+crlf+crlf

JMail.appendtext "Here are your membership details" & crlf & crlf
JMail.appendtext "Username" & tab2 & <b>username</b> & crlf
JMail.appendtext "Password" & tab2 & <b>password</b> & crlf

Dave



Edited by - Davecl on 14 Sep 2002 21:53:15
Replied 16 Sep 2002 13:32:06
16 Sep 2002 13:32:06 David Behan replied:
Here is a form to mail script I wrote for generic mail sending using CDONTS. It could be useful:

www.aspin.com/func/content-review?id=4828010&rid=

Regards,

Dave

_________________________
WinXP : IIS 5.1 : StudioMX : ASP : VBScript
www.clicksdesign.com

Reply to this topic