Author |
Topic |
Alfred
Senior Member
USA
1527 Posts |
Posted - 02 February 2003 : 21:33:30
|
Snitz vs. 3.4.03 dutyreport.txt
I have an asp page containing a form in htm, which I want to mail with my Jmail. I have tried all kinds of things, but it only mails me the text, without the "M_Name" and "Name".quote: if strEmailVal = "1" then '## mail me start ############################ strRecipients = "battlegroup@ggholiday.com" strsubject = "Relief of Command Request" strMessage = "by: " & Request.Form("M_Name") strMessage = "Relief requested at: " & Request.Form("Name") %> <!--#INCLUDE file="inc_mail.asp" --> <% end if '## mail me end ############################
Also, what has to go into the "action" for that? <form name="dutyform" method="post" ENCTYPE="text/plain" action="?">
|
Alfred The Battle Group CREDO
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 03 February 2003 : 04:24:58
|
Hi Alfred,
It looks like your forms don't contain those fields - for the strMessage bit.
For the action I would have the asp page containing the code you have quoted. |
|
|
Alfred
Senior Member
USA
1527 Posts |
Posted - 03 February 2003 : 13:35:20
|
Isn't this one of the two fields:quote: <select name="Duty_Report"> <option value="none" selected>Select your Name!</option> <% do while not myMembers.eof response.write "<option value=""" & myMembers("M_NAME") & """>" & myMembers("M_NAME") & "</option>" & vbNewLine myMembers.movenext loop %> </select>
|
Alfred The Battle Group CREDO
|
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 03 February 2003 : 14:58:40
|
No, the name of the form field is Duty_Report
quote: Originally posted by Alfred
<select name="Duty_Report"> <option value="none" selected>Select your Name!</option> <% do while not myMembers.eof response.write "<option value=""" & myMembers("M_NAME") & """>" & myMembers("M_NAME") & "</option>" & vbNewLine myMembers.movenext loop %> </select>
|
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 03 February 2003 : 15:00:43
|
Fields from the database, yes. Form obect, I don't think so . .although I'm not really sure. I have problems getting select's to work sometimes (just my brain ), but I would try Request.Form("Duty_Report") and see what you get.
I just had a look at your first post again, and you'll need to change it to :
strsubject = "Relief of Command Request"
strMessage = "by: " & Request.Form("M_Name")
strMessage = strMessage & " Relief requested at: " & Request.Form("Name")
The code also means that you get :
by: laser Relief requested at: laser
so maybe you need to do :
strMessage = strMessage & " Relief requested at: " & Now()
|
|
|
Alfred
Senior Member
USA
1527 Posts |
Posted - 03 February 2003 : 15:59:59
|
I see - the "Select" name is the form field name!
For uniformity I renamed the two select statements "myMembers" and "myScen" and put those two names into the mail request:quote: ## mail me start ############################ strRecipients = "battlegroup@ggholiday.com" strsubject = "Relief of Command Request" strMessage = strMessage & " by: " & Request.Form("myMembers") strMessage = strMessage & " Relief requested at: " & Request.Form("MyScen") %> <!--#INCLUDE file="inc_mail.asp" --> <% '## mail me end ############################
but all I get in the mail is this: by: Relief requested at: |
Alfred The Battle Group CREDO
|
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 03 February 2003 : 16:59:19
|
action is the page to send the form data to process the results, so you need to put the name of the page that you are using to send the email. |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
Alfred
Senior Member
USA
1527 Posts |
Posted - 03 February 2003 : 17:30:56
|
But Nikkol, I want to have it sent to my email address. If I leave that as the action, the way I do it in html: <form name="dutyform" method="post" ENCTYPE="text/plain">action="mailto:alfred@ggholiday.com"> - would it not be mailed twice then, once by my server and once by the user's email client?
Or do you mean our inc_mail.asp page? So it would have to look like this: <form name="dutyform" method="post" ENCTYPE="text/plain" action="inc_mail.asp">
No, that didn't do anything but bring up an empty inc_mail.asp page...
|
Alfred The Battle Group CREDO
|
Edited by - Alfred on 03 February 2003 17:39:24 |
|
|
Alfred
Senior Member
USA
1527 Posts |
Posted - 03 February 2003 : 17:43:12
|
Laser, the "at" does not refer to time, but location of Scenario! All scenarios are in my database as text fields. |
Alfred The Battle Group CREDO
|
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 03 February 2003 : 18:00:18
|
action="processmailpage.asp"
and processmailpage.asp has the following code in it:
## mail me start ############################
strRecipients = "battlegroup@ggholiday.com"
strsubject = "Relief of Command Request"
strMessage = strMessage & " by: " & Request.Form("myMembers")
strMessage = strMessage & " Relief requested at: " & Request.Form("MyScen")
%>
<!--#INCLUDE file="inc_mail.asp" -->
<%
'## mail me end ############################ |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
Alfred
Senior Member
USA
1527 Posts |
Posted - 03 February 2003 : 18:42:08
|
Now I am really confused, Nikkol.
I should make a small file called "processmailpage.asp" and put the short chunk of code in it? How does that file know about my two "select" fields, which are in the "dutyreports.asp"? |
Alfred The Battle Group CREDO
|
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
Alfred
Senior Member
USA
1527 Posts |
Posted - 03 February 2003 : 19:58:03
|
Oh, you can request forms from your whole website? I thought it has to be in the same file! This means one has to take care not to use the same names more than once...
Ok, I did as you said now, but still only got this in the mail: "by: Relief requested at: "
BTW, just saw your final post you linked to. Will try to find that.
Still didn't solve this failure here though...
|
Alfred The Battle Group CREDO
|
Edited by - Alfred on 04 February 2003 16:55:08 |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 05 February 2003 : 05:15:17
|
Alfred, can you upload the latest file you have as a text file ?
Thanks |
|
|
Alfred
Senior Member
USA
1527 Posts |
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 05 February 2003 : 11:18:48
|
Your duty report page has an error Alfred:
Microsoft JET Database Engine error '80040e37'
The Microsoft Jet database engine cannot find the input table or query 'SCENARIOS'. Make sure it exists and that its name is spelled correctly.
/bg/forums/dutyreport.asp, line 23
|
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
Topic |
|